I\'m getting a string from a $_GET and I want to test if it could be a boolean, before I use it for a part of a mysql query. Is there a better way of doing it than:
You can use is_bool to test your string:
is_bool
if(is_bool($val)){ // is boolean }else{ // not a boolean }