您可以在数组中定义可转换字符,并使用
原文链接:https://www.f2er.com/php/135708.htmlstr_replace()
:
$conversions = array( "æ" => "ae","ñ" => "n",); $text = str_replace(array_keys($conversions),$conversions,$text);