What\'s the best way to see if a string contains all capital letters? I still want the function to return true if the string also contains symbols or numbers.
I think you are looking for this function
$myString = "ABCDE"; if (ctype_upper($myString)) // returns true if is fully uppercase { echo "the string $myString is fully uppercase"; }
Hope it helps