"Mike Cullerton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> it's an if/else shortcut.
>
> the part before the '?' is tested. '$i % 2' in your case.
>
> the part after the '?' is returned if the test evals to true. '0' in your
> case.
Documentation at
http://www.php.net/manual/en/language.operators.comparison.php
Think of ( A ? B : C ) as
if (A)
return B;
else
return C;
For example,
$a = 2;
echo "The value of a is" . ($a == 2 ? "" : " not" ) . " 2";
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]