![]() |
Checking if a string is alphanumeric
I was looking for the best way to check if a string is alphanumeric and I found things along the lines of:
PHP Code:
The second one seems much better to me :-/ |
Use ctype over preg_match where possible, yes.
-m |
THANK YOU
I haven't found that function before... and I hate regex... and I usually cry when I have alphanumeric input fields. You saved me many hours of crying. |
| All times are GMT. The time now is 08:52 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0