October 14, 200818 yr I can remove all the non-alphanumeric characters from a given string like this $string = ereg_replace("[^A-Za-z]", "", $string); But I want to trim all characters from a string EXCEPT whitespace - any ideas?
October 15, 200818 yr Author No worries, I've figured it out now... just in case you wanted to know - you just add any of the character types you want to keep within the parentheses. $string = ereg_replace("[^A-Za-z ]", "", $string);
Create an account or sign in to comment