look at http://www.phpbuilder.com/board/showthread.php?threadid=10235547
http://www.phpbeginner.com/columns/maxim/ternary
pete
Adrian Greeman wrote:
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