我们为大家收集整理了关于php去除html标签,以方便大家参考。
"'&(amp|#38);'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'peihuo\.cn|peihuo\.mobi|div|\/'",
"'&#(\d+);'e"); // 作为 PHP 代码运行
$replace = array ("",
"",
" ",//"\\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169),
"",
"chr(\\1)");
return preg_replace ($search, $replace, $str);
}
希望大家可以学会php去除html标签.想了解更多精彩内容,请关注我们的网站!
相关推荐:
html标签注释的方法