PHP – Helper Function – clean_xhtml
if ( ! function_exists('clean_xhtml'))
{
function clean_xhtml($string)
{
/*$string = preg_replace('@<iframe[^>]*?>.*?@siu', '',html_entity_decode($string));
$string = preg_replace('@<p[^>]*?>.*?
@siu', '',$string);
return $string;*/
$string = ereg_replace("<[^>]*>", "", $string);
$string = preg_replace("@<p[^>]*?>.*?
@siu", '',$string);
return $string;
}
}
Last updated: March 19, 2014