PHP头条
热点:

如何去掉文章里的 html 语法


<?
$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;
?>

www.phpzy.comtrue/php/6522.htmlTechArticle如何去掉文章里的 html 语法 ? $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 保留原有...

相关文章

相关频道:

PHP之友评论

今天推荐