Validate Alpha Characters in PHP
This PHP program will check if the given string is containing only alpha character or other than alpha characters. Here we are going to check it using regular expression with the help of preg_match().function is_alpha($val)
{return (bool)preg_match("/^([a-zA-Z])+$/i", $val);}
Regular Expression for Alpha Validation
/^([a-zA-Z])+$/i
If the input is like Nscraps,PHP,coding it will return true. for inputs like PHP5.0, coding1 will return false.
