Home > Article > Backend Development > PHP custom function to replace special characters in extremely long text_PHP tutorial
function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"
",$content);
$content=str_replace(chr(32),"
",$content);
$content=str_replace("[_[","<",$content);
$content=str_relace(")_)",">",$content);
$content=str_replace("|_|","",$content);
rerurn trim($content);
}
摘自 ms.元