determines whether the combination of letters and numbers or alphanumeric if (! Ctype_alnum ($STR)) { ' can only be a combination of letters or numbers '; exit;}
Tidy up the CType functions:
1.ctype_alnum (String $text)://Check whether it's a combination of letters or numbers or alphanumeric numbers2.ctype_alpha (String $text): CheckFor alphabetic character (s)//Check if the string is a letter3.ctype_cntrl (String $text): CheckFor control character (s)//Is the control word such as \n,\r,\t4.ctype_digit (Strint $text): CheckFor numeric character (s)//Whether the character is a numeric representation5.ctype_graph (String $text): Checkfor any printable character (s) except space// Check if there are any printable characters except spaces (complement)6.ctype_lower (): Check for lowercase character (s)// Check if it is lowercase letter 7. Ctype_upper (): Check for uppercase character (s)// Check if uppercase letter 8.ctype_space:check for whitespace Character (s)// is a blank character 9.ctype_xdigit:check for character (s) representing a hexadecimal digit Check if it is a hexadecimal digit
The difference between ctype_digit () and Is_numeric ():
Example: $numeric _string='123'123; Ctype_digit ($numeric _string); Truectype_digit ($interger); / /////True
PHP function------Ctype_alnum