Remove HTML formatting
I was looking for functionality to remove the html tags from text (i.e. anything of this format <*>). I’m sure there’s a built-in PHP function to do this, but I couldn’t find one, so I made a function:
function get_plaintext($in){
//goes from < to the next > and removes it.
return stripslashes(preg_replace(’/\< [^>]+\>/’,”,$in));
}

Paolo Said,
September 12, 2005 @ 10:43 am
http://php.net/striptags
Raybdbomb Said,
September 12, 2005 @ 11:07 am
You mean
http://php.net/strip_tags
good call