Alpha or Numeric

is_numeric($var) will check to see if it's numbers
preg_match('%^[A-Za-z]+$%', $var) will check to see if it's letters
preg_match('%^[A-Za-z0-9]+$%', $var) will check to see if it's alphanumeric

0 Comments

You must be logged in to post a comment.