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

Yes, so I can do something like:

php Syntax (Toggle Plain Text)
  1. function strip_tag($text, $tag) {
  2. return ereg_replace('</?'.$tag.'[^>]*>', '', $text);
  3. }
  4.  
  5. echo strip_tag($text, 'font');

I'd still like to see if there's something tried and tested though.
Sane is offline   Reply With Quote