[Phpwm] Truncating HTML with PHP
alex at hollytree.co.uk
Mon Jun 8 14:12:00 UTC 2009
I think HTML Purifier might do the job - just cut the HTML off at 400
characters and then pass it into HTML Purifier and I believe it should
give you standards compliant output.
On 8 Jun 2009, at 15:01, Mike Tipping wrote:
> I need to be able to take the fists 400 characters of some html
> text and incorporate it in a second HTML page so it doesn't beak the
> ie not have unclosed <p> or <span> tags etc.
> Does anyone know of an easy way of doing this in PHP or am I going
> to have
> to start counting tags myself?
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
More information about the Phpwm