Re: what does this mean?

From: Date: Fri, 25 Feb 2005 20:30:30 +0000
Subject: Re: what does this mean?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-209431@lists.php.net to get a copy of this message
Jason Barnett wrote:
Leif Gregory wrote:
Hello Diana, Friday, February 25, 2005, 7:07:29 AM, you wrote: D> on which page of php.net can I find out what this code does?
D> $a      = $b? $a :"dian";
It's called a ternary operator, basically an if-else statement.
Note to self: write "ternary" on the blackboard 100 times.
I thought 'tertiary' also - I could remember the 'other' name... I was under the impression that both names were valid.. anyone know if this is true? google brings up relevant hits for both, from what I gather ternary is more correct.
Yep, it's just a fancy if-else statement.


« previous php.general (#209431) next »