Re: if then else short form

From: Date: Fri, 21 Jan 2005 12:19:55 +0000
Subject: Re: if then else short form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206926@lists.php.net to get a copy of this message
Ben Edwards wrote:
I seem to remember seing someone use a abreaviated form of a if/them/else of the type that can be used in java. It was something like if ( a=b ) ? a=1 ; a=2;
I called it the 'tertiary' syntax which is not correct: to quote a page I found: " that the book refers to a "tertiary" operator, instead of a "ternary" operator. Of course, "tertiary" means third. "Ternary" means having three parts and is the correct way to describe the ?: operator. Alternatively, this operator could be described as "trinary". "
Anybody know what the correct syntax is? Ben


« previous php.general (#206926) next »