RE: [PHP] shorthand "if" notation

2003-06-11 Thread Ford, Mike [LSS]
> -Original Message- > From: adrian GREEMAN > [mailto:[EMAIL PROTECTED] > Sent: 11 June 2003 15:23 > > I am confused by the shorthand "if" notation. > For example I just saw this PHP snippet on another forum > > $bkgndClass = $bkgndClass == "darkBkgnd" ? "liteBkgnd" : > "darkBkgnd"; > }

RE: [PHP] shorthand "if" notation

2003-06-11 Thread Dan Joseph
Hi, > -Original Message- > I am confused by the shorthand "if" notation. > For example I just saw this PHP snippet on another forum Basically: (condition) ? true : false; Example: $var == "red"; ($var == "red") ? echo 'true' : echo 'false';

[PHP] shorthand "if" notation

2003-06-11 Thread adrian GREEMAN
I am confused by the shorthand "if" notation. For example I just saw this PHP snippet on another forum 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