PHP if statement - either but not both -


what's correct way rephrase statement passes if either variable set, not if both set?

if (isset($_get['txnid']) || isset($_get['complete'])){ 

yes, called xor, true if either 1 of them true, not both.

if (isset($_get['txnid']) xor isset($_get['complete'])){ 

source: php: logical operators


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

Redirect to a HTTPS version using .htaccess -