首页  >  文章  >  后端开发  >  php自定义函数替换超长文本中的特殊字符_PHP教程

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

WBOY
WBOY原创
2016-07-13 17:51:10789浏览

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

}
 

 

摘自 ms.元

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478227.htmlTechArticlefunction unhtml($content){ $content=htmlspecialchars($content); $content=str_replace(chr(13),br,$content); $content=str_replace(chr(32),br,$content); $content=str_replace([_[,,$con...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn