View Single Post
Old Jan 2nd, 2008, 1:12 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,069
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Best Way To Strip Certain Tags From A String

Great!

Thank-you.

But I can only use this temporarily, because it's not exactly what I need. I want to specify tags for inclusion. Not for exclusion.

So currently I can go:

strip_tags($text, '<p><div>');

However, that's specifying tags to exclude. Whereas I want something like this:

strip_tags_only($text, '<font>');

To specify the only tags included in the stripping.
Sane is offline   Reply With Quote