Hi mate,
I use regex for my validation but @ this time I get confuse, how to use white space in it.
I want user to enter a city name, some city name contains white space like Los Angeles, New York, I have regex which is not allowing user to enter digits with city name.
like,
if(ereg('[^A-Za-z]', $city)) {
echo "Only Characters Allowed";
}
else {
echo "Thank You";
}
This code does not allow user to enter digits in between city name, but this code does not allow me to enter space in between. If you have any suggestion for me then please draw my attention towards that.
Cheers!!