PHP function------Ctype_alnum

Source: Internet
Author: User
Tags alphabetic character printable characters uppercase character uppercase letter

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.