String manipulation functions in any programming language are the most commonly used functions by developers. So, I have decided to give few functions that might be useful for you as PHP developer.
bool ctype_alpha(mixed c) checks if the string contains only alphabetical characters
Example
ctype_alpha("WE2007") returns false because it alphanumeric
ctype_alpha("HELLO") returns True because it contains alphabetical charchaters only
bool ctype_digit(mixed c) checks if the string is valid number
Example
ctype_digit("RF334") returns false
ctype_digit("1533") returns True
bool ctype_xdigit(mixed c) checks if the string is valid hexadecimal number
Example
ctype_xdigit("RFJHFA3") returns false
ctype_xdigit("15BF") returns True
Note : that valid Hex numbers are 0 1 2 3 4 5 6 7 8 9 A B C D E F
All of the above functions supported by PHP version 4.0.4 or higher
bool ctype_alpha(mixed c) checks if the string contains only alphabetical characters
Example
ctype_alpha("WE2007") returns false because it alphanumeric
ctype_alpha("HELLO") returns True because it contains alphabetical charchaters only
bool ctype_digit(mixed c) checks if the string is valid number
Example
ctype_digit("RF334") returns false
ctype_digit("1533") returns True
bool ctype_xdigit(mixed c) checks if the string is valid hexadecimal number
Example
ctype_xdigit("RFJHFA3") returns false
ctype_xdigit("15BF") returns True
Note : that valid Hex numbers are 0 1 2 3 4 5 6 7 8 9 A B C D E F
All of the above functions supported by PHP version 4.0.4 or higher
