Possible Duplicate:
Regular Expression To Anglicize String Characters?
What would be the best way to convert foreign language characters to english ones? For example ü to u.
Possible Duplicate:
Regular Expression To Anglicize String Characters?
What would be the best way to convert foreign language characters to english ones? For example ü to u.
There are only a couple of reasons to do this (url friendliness, mostly). You want strtr.
It basically works like this:
$addr = strtr($addr, "äåö", "aao");
The 2nd comment in the manual has a nice translation table for you.
$text = mb_str_replace('ü','u', $text);
To find all non English character using:
preg_match('#[^a-z0-9\-\.\,\:\;]#', $text, $characters);