December 27, 2013

PHP – Helper Function – clean_xhtml

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