php - Checking Multiple $_GET variables if equals a string -


  if(isset($_get['a']) || isset($_get['b']) || isset($_get['c'])){       if(($_get['a'] || $_get['b'] || $_get['c']) == "x"){           echo "yes";       } else {           echo "no";       }   } 

in php code, i'm trying check if 1 of requests isset , if 1 of them value == 'x' or not, 2nd part if(($_get['a'] || $_get['b'] || $_get['c']) == "x") doesn't work intended @ all, wrapped inside () hoping work, in condition, have separate did inthe isset() part? or there better method that?

this looking

update - changed || && last condition in case quick try out.

if( (isset($_get['a']) && $_get['a'] == "x") || (isset($_get['b']) && $_get['b'] == "x") || (isset($_get['c']) && $_get['c'] == "x")){       echo "yes"; } else {       echo "no"; } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -