文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>如何去掉文章里的 html 语法

如何去掉文章里的 html 语法

时间:2007-02-17  来源:PHP爱好者

<?
$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爱好者站 http://www.phpfans.net c/vc/c++/java.
相关阅读 更多 +
排行榜 更多 +
卿卿我我

卿卿我我

聊天通讯 下载
黑鲨浏览器

黑鲨浏览器

系统软件 下载
上艺

上艺

生活实用 下载