当前位置:编程学习 > php >>

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

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.元

补充:Web开发 , php ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,