How to clip HTML fragments without breaking up tags?

Kakyenzymnageip

New Member
Say I have a 200 character string that contains HTML markup. I want to show a preview of just the first 50 chars. without 'splitting up' the tags. In other words, the fragment should not contain a \[code\]<b>\[/code\] without a \[code\]</b>\[/code\]. Any server side processing should be in PHP.
 
Back
Top