Re: Syntax
| From: | Scott Carr | Date: | Tue, 23 Jul 2002 14:53:35 +0000 |
| Subject: | Re: Syntax | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-14897@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/language.expressions.php
There is one more expression that may seem odd if you haven't seen it in other
languages, the ternary conditional operator:
$first ? $second : $third
If the value of the first subexpression is TRUE (non-zero), then the second
subexpression is evaluated, and that is the result of the conditional
expression. Otherwise, the third subexpression is evaluated, and that is the value.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Kit Kerbel <kerbel5@hotmail.com>:
>
> What, if you please, does this syntax denote exactly.
>
> ($i==0?($i):($i*20))
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/