Ternary operator.  Look in the comparison operators section:
http://us2.php.net/manual/en/language.operators.comparison.php

-Shawn

"Adrian Greeman" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>
> I am confused by the shorthand "if" notation.
> For example I just saw this PHP snippet on another forum
>
> <?
> $bkgndClass = $bkgndClass == "darkBkgnd" ? "liteBkgnd" :
> "darkBkgnd";
> }
> ?>
>
> I think it is an if but cannot find it in the manual.         How
> is that written in the more normal notation -   if(){}   etc??
>
> [And please excuse a slightly off-thread but related extension to
> the question but I have seen similar in Javascript  - namely --- 
> var evt = (evt ? evt : ((window.event) ? window.event : null);
> is this the same notation or something else?]
>
> Regards            Adrian Greeman
>



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

Reply via email to