Welcome to WebmasterWorld Guest from 126.96.36.199
I have to format some non-english names that contain 'strange characters': I've been looking, but have not found, the correct PHP aproach.
Ideally I'd like to do this:
That'll remove one odd character easy enough. If you need to do more then do something like preg_replace("/[a][\s]+/","\\1",$str); which will remove every letter a and replace it with a space. So just change it to suit your needs.
$find = array ("/a/","/b/","/c/");
$replace = array ("x","y","z");
$within_this_string = preg_replace($find,$replace,$within_this_string);
Then "abcdefg" becomes "xyzdefg".... etc.
I don't know how fast this would be compared to multiple calls to str_replace...