Brian Anderson wrote:
What is the proper syndax in an if statement for containing multiple conditions?

example:

if ( condition1 && condition2 ) {

    dothis;
}

if ( condition1 && (condition2 || condition3) ) {

    dothis;
}



Both are valid. First example will validate if both condition1 and condition2 evaluate to true (they're set, and not null or false, etc.).

Second example will validate if condition1 evaluates to true AND EITHER condition2 OR condition3 evaluate to true

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to