文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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 PHP|MySQL|javascript|ajax|html.
相关阅读 更多 +
排行榜 更多 +
团队枪战中文版

团队枪战中文版

飞行射击 下载
团队枪战内置MOD菜单

团队枪战内置MOD菜单

飞行射击 下载
欢乐消除开心假日小游戏

欢乐消除开心假日小游戏

休闲益智 下载