note 38655 modified in language.operators.comparison by kennyt

From: Date: Thu, 01 Jan 2004 19:22:06 +0000
Subject: note 38655 modified in language.operators.comparison by kennyt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62756@lists.php.net to get a copy of this message
[Ed. Note: 'echo' is just fine for use in ternary expressions. <?php echo isSet($var) ? $var : 'no'; ?> -- kennyt] <?php // For direct output with ternary operator, // use "print", not "echo". isset ( $var ) ? print $var : print "no"; ?> --was-- <?php // For direct outupt with ternary operator, // use "print", not "echo". isset ( $var ) ? print $var : print "no"; ?> http://www.php.net/manual/en/language.operators.comparison.php

« previous php.notes (#62756) next »