Re: Re: how to say "inverse your value" (to a boolean)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



http://us3.php.net/manual/en/language.operators.comparison.php

Find "Ternary" on that page.

It's a shortened conditional:

cond ? true : false

Adam.

On Mon, Aug 10, 2009 at 6:27 PM, John
Butler<govinda.webdnatalk@xxxxxxxxx> wrote:
>>  echo "something " . (($a = $a^1) ? "red\n" : "green\n");
>
> Re: The "?" char in this ^^^^ line above..
> where in the php docs can I read about what that is doing?
> I have not come across this construct before today, from you guys.
>
> thanks
> -John
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Adam Randall
http://www.xaren.net
AIM: blitz574

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux