note 57165 deleted from language.control-structures by nlopess

From: Date: Tue, 11 Oct 2005 17:28:06 +0000
Subject: note 57165 deleted from language.control-structures by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96842@lists.php.net to get a copy of this message
Note Submitter: terry at mackintoshweb dot com ---- When using the ?: syntax: echo "Something " . <condition> ? "true" : "false"; The above works, but not the below: <condition> ? echo "Something ture" : echo "Something false"; which causes a syntax error. It seems that ?: can return a static value but can not execute a command? Granted the above example is contrived.

« previous php.notes (#96842) next »