php自定义函数替换超长文本中的特殊字符

来源:岁月联盟 编辑:exp 时间:2012-05-22

function  unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"<br>",$content);
$content=str_replace(chr(32),"<br>",$content);
$content=str_replace("[_[","<",$content);
$content=str_relace(")_)",">",$content);
$content=str_replace("|_|","",$content);
rerurn trim($content);

}
 

 

摘自 ms.元