Forum Moderators: coopster
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.
Jordan
Eg,
$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...