您的位置:首页技术文章

如何去掉文章里的 html 语法

【字号: 日期:2023-09-16 16:04:17浏览:45作者:馨心
<? $a="<font color=red>这是一个带HTML标识的字串</font>"$a=strip_tags($a); print $a; ?> 2<? $a="<font color=red>这是一个带HTML标识的字串</font>"ereg_replace("^<.+>$", "", $a); print $a; ?> 3 保留原有内容<? $a="<font color=red>这是一个带HTML标识的字串</font>"ereg_replace("<", "<", $a); ereg_replace(">", ">", $a); print $a; ?>
标签: PHP