如何去掉文章里的 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; 
?> 

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/31213.html