Page 1 of 1

Remove all HTML except breaks and paragraphs...

Posted: Mon Aug 07, 2006 6:48 pm
by Mr Tech
How do I remvoe all HTML except breaks and paragraph tags from a string?

Posted: Mon Aug 07, 2006 6:58 pm
by volka

Posted: Mon Aug 07, 2006 7:54 pm
by feyd
Look in Useful Posts for a slightly smarter strip_tags()

Posted: Mon Aug 07, 2006 8:07 pm
by Mr Tech
Thanks. This si what I go to work:

Code: Select all

echo strip_tags($text, "<br>,<p>");