ホームページ >バックエンド開発 >PHPチュートリアル >非常に長いテキストの特殊文字を置換する PHP カスタム関数_PHP チュートリアル
関数 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);
トリムを再実行($content);
}
元さん抜粋