On Wed, 22 May 2002, Shane wrote: > Too Many HOURS!!! > Too Little M&Ms!! > Forgot... Brain... Ouch! > > Someone please remind me, what the hell the syntax for the short hand of the PHP "IF >THEN" statement is where multiple variables need to be checked > > if($foo == "Panda" and $bar == "bear){ > doWhatever(); > } > > Thanks gang! > - Shane
If I understood you correctly, there is a short hand syntax for "IF THEN ELSE" (not just "IF THEN") which is like: (expression)?(then_expression):(else_expression) Of course if you only have a THEN part its easy to do: ($foo=="Panda" && $bar=="bear")?(doWhatever();):true; cheers, thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php