note 10380 added to Comparison Operators

From: Date: Sat, 30 Dec 2000 04:54:51 +0000
Subject: note 10380 added to Comparison Operators
Groups: php.notes 
Request: Send a blank email to php-notes+get-9253@lists.php.net to get a copy of this message
bug in the (otherwise very cool) ternary condition operator; the results seem to overwrite the line-based output buffer.. i.e. echo "You have had a fat butt for $x day". ($days>1) ? "s" : "" ."\n"; this should put the "s" on days if need be, but instead, the entire echo statement outputs either nothing or "s"... it forgets about all the stuff to echo before the ternary operator... http://www.php.net/manual/language.operators.comparison.php

« previous php.notes (#9253) next »