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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php