hey,
I have used
$string = ereg("^[A-Za-z0-9]$",$string);
which seems to remove the letters and numbers.. I need it to do the opposite! I want to leave just the letters and numbers...
how can I change it to do that?
thanks..
$string = '124knasd$%-.R8';; echo ereg_replace('[^0-9A-Za-z]', '', $string);
nice one - works great! how can I also allow spaces, sorry! thanks 🙂
A space on the end of the pattern
echo ereg_replace('[^0-9A-Za-z ]', '', $string);