Is there any easy way to detect if a string is all alpha (no numbers in it).
It would be even more helpful if it could also detect or test case.
Brian
The way I do it is
preg_match("/^[A-Za-z]+$/",$string)
It will return true if $string is made up of only letters. If you want it to do only lowercase, replace [A-Za-z] with just [a-z]. And uppercase is just the same, but uppercase.
www.php.net/eregi www.php.net/ereg
Thank you Trs2988
Your code worked perfectly.
No problem. Remember to mark the thread resolved.