I am trying to convert characters like:
ë, ä, ï, ö, etc.
To normal characters like:
e, a, i, o, etc.
What
try this .. works for me.
iconv('utf-8', 'ascii//TRANSLIT', $text);
For example, it is create a simple readable URL from a content title:
function cleanurl($title) {
return urlencode(strtolower(str_replace(" ","-",preg_replace("/&([a-z])[a-z]+;/i", "$1", htmlentities($title)))));
}
i like stewies' answer, but for completeness this works for me.
preg_replace("/&([a-z])[a-z]+;/i", "$1", htmlentities($foo));