页面导航: 首页网络编程PHP编程php教程 → 正文内容

如何去掉文章里的 html 语法

发布:dxy 字体:[增加 减小] 类型:转载
<?
$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;
?>
浏览次数:载入中... 打印本文关闭本文文章来源
·在百度中搜索关于“如何去掉文章里的 html 语法”相关内容
·在谷歌中搜索关于“如何去掉文章里的 html 语法”相关内容

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行