Not quite sure what you want, but you could use a javascript function there's an example here

peppy
—
2013-02-06T21:44:52Z —
#3

Greetings,

Thanks for the response. I already have the toggle feature. I have my articles store in a database and already HTML formatted. I basically want to divide the article and show the first 1000 character part of the article, and then show the second part of the article when they click the "expand" link.

Revised Question:I guess a better question is how can I find the first HTML end tag (</p>,</a>,</table>, etc) AFTER the first 1000 characters in a string and store all of that (including the HTML end tag) into $part1, and then take the remainder of the string and store it into $part2. The string contains the entire HTML formatted article.

Thanks

peppy
—
2013-02-06T23:01:24Z —
#4

Nevermind, I got a workaround. Just found the strpos of the first <p> tag after a 1000 character offset. Then split the article into two parts to hide and expand if the article is over 1000 characters.

Thanks for looking anyways.

Kind regards

Cups
—
2013-02-07T14:21:13Z —
#5

Consider only fetching 1000 chars from your database in the first place using LEFT()