I have this code that checks if a string is blue.
I want it to approve it regardless of whether it’s lower or upper case in any of the letters.
if( ($subcol !== 'blue') || ($subcol !== 'Blue') || ($subcol !== 'BLUE') ) {
$form->setError($field, "* Colour not correct, use the hint");
}
This doesn’t seem to work?
Have I structured something wrong?
Also, is there a PHP function that can be used that will just check it once for all these scenarios?
Thanks
You can use:
This is true for
blueBLUEBluebLueetc.