Simple IF statement question

Posted by JGreig on Stack Overflow See other posts from Stack Overflow or by JGreig
Published on 2010-04-28T17:21:19Z Indexed on 2010/04/28 18:17 UTC
Read the original article Hit count: 269

How can I simply the below if statements?

if ( isset(var1) & isset(var2) ) {

    if ( (var1 != something1) || (var2 != something2) ) {

        // ... code ...
    }

}

Seems like this could be condensed to only one IF statement but am not certain if I'd use an AND or OR

© Stack Overflow or respective owner

Related posts about if-statement

Related posts about programming-languages