note 10011 added to Comparison Operators
| From: | anthony at n dot o dot s dot p dot a dot m dot trams dot com | Date: | Wed, 06 Dec 2000 20:16:51 +0000 |
| Subject: | note 10011 added to Comparison Operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8488@lists.php.net to get a copy of this message | ||
Here is a double tertinary:
$foo = 'yes' ;
$bar = 'no' ;
echo ( $foo == 'yes' ? ( $bar == 'no' ? 'foo is yes and bar is no' :
'foo is yes but bar is not no' ) : 'foo is not yes, did not get to bar' ) ;
http://www.php.net/manual/language.operators.comparison.php