function conv($var){ $chars = array( "À" => "A", "Â" => "A", "Ä" => "A", "Æ" => "AE", "È" => "E", "Ê" => "E", "ÃŒ" => "I", "ÃŽ" => "I", "Ã" => "D", "Ã’" => "O", "Ô" => "O", "Ö" => "O", "Ø" => "O", "Ú" => "U", "Ü" => "U", "à " => "a", "â" => "a", "ä" => "a", "æ" => "ae", "è" => "e", "ê" => "e", "ì" => "i", "î" => "i", "ð" => "o", "ò" => "o", "ô" => "o", "ö" => "o", "ø" => "o", "ú" => "u", "ü" => "u", "Ã" => "A", "Ã" => "A", "Ã…" => "A", "Ç" => "C", "É" => "E", "Ë" => "E", "Ã" => "I", "Ã" => "I", "Ñ" => "N", "Ó" => "O", "Õ" => "O", "Ù" => "U", "Û" => "U", "Ã" => "Y", "ß" => "B", "á" => "a", "ã" => "a", "Ã¥" => "a", "ç" => "c", "é" => "e", "ë" => "e", "Ã" => "i", "ï" => "i", "ñ" => "n", "ó" => "o", "õ" => "o", "ù" => "u", "û" => "u", "ý" => "y", "ÿ" => "y"); return str_replace(array_keys($chars),$chars,$var); } PHP: Hello, I am trying to convert all non english characters to english. Is there an easy way to do this? Has anybody already done this? Any suggestions wellcome. thanks
Lol, those characters aren't english, they're a collection of Latin letters and Arabic digits. There's no such thing as english characters.
@Clades: Wow, you bothered typing all that just to insult the original posters ignorance? Pretty lame. @OP: Here's a solution that'll work assuming you have iconv: echo iconv('', 'ASCII//TRANSLIT', $text); PHP: Please note, you may need to strip out some "extra" `^" and similar due to the way it works. Dan