How to inject a string in an HTML fragment

Bart

New Member
I would like to insert a read more HTML bit at a certain position in an HTML fragment - say after the 10th word. I will then, via JavaScript, hide the text after the "read more" and only show it on click. The JavaScript part is ok. As to the PHP part.It seemed simple at first - but the problem is that tags mess up the word count and the truncation. So I would need to close any opened tag which closing counterpart is beyond the "read more".Any insight would be appreciated.
 
Back
Top