PDA

Click to See Complete Forum and Search --> : strip out all html tags from a string


ikaris69
Apr 3rd, 2007, 12:27 PM
im trying to get rid of all html from a string. this is what i have so far


$Data = ereg_replace("/<.*>/i", "", $Data);

dclamp
Apr 3rd, 2007, 12:34 PM
try


$text = "(html code here)";
strip_tags($text);

sciguyryan
Apr 3rd, 2007, 12:34 PM
You could just try strip_tags() (www.php.net/strip_tags) :)

-- Ryan

dclamp
Apr 3rd, 2007, 12:37 PM
little late there ;)