> -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";
> }
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';
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
3 matches
Mail list logo