Well, there are several ways to accomplish this task. First, you can use the “ctype” function and loop thru the letters to see if one is upper case and one is lower case. You would use a foreach loop selecting each letter and then test it with:
if (ctype_upper($letter)) {Do some code…}
Same with lower, just ctype_lower()…
So, set some variables for each of the tests. Then, create a foreach loop to go thru the letters.
Compare each with the condition test needed. If found set a variable. If not, do next test…
When for loop is done, check the variable for a “good” result…
Or, study the preg_match function for formulas. I find these confusing compared to a down and dirty PHP program… Here is a link for preg_match tutorials. Not sure if it will help, but, it once you understand setting up the pattern you need, the code for using it is only one line! Good luck…
http://www.tipsntutorials.com/tutorials/PHP/50