Checks if a string is alphanumeric.
<?php function isAlphanumeric($str) { if (preg_match("/^([a-z0-9])+$/i", $str)) return true; return false; } ?>
Input $str, returns true if the string is alphanumeric, and false if it is not.
Rating: 0 / 5 (0 votes) 5523 views
Want to share your source code? Create your account and join our community!
Comments
Add your comment