check if string has letters php code example
Example 1: php string only letters
$result = preg_replace("/[^a-zA-Z0-9]+/", "", $s);
Example 2: php check if string contains a char
$haystack = 'This is my haystack that we shall check'
$has_A = strpos($haystack, 'A') !== false;
$has_a = strpos($haystack, 'a') !== false;