note 70426 deleted from language.control-structures by colder

From: Date: Mon, 16 Oct 2006 11:01:02 +0000
Subject: note 70426 deleted from language.control-structures by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118569@lists.php.net to get a copy of this message
Note Submitter: Diz Reason: bad code ---- Considering how important the "if" construct is there's not alot of love given to this section.. I hope this simplifies the below examples. <?php $a = "set"; if ($b = $a) echo "will display this. \$b = $b"; unset($a); if ($c = $a) echo "Doesn't dispay this"; if(isset($c)) echo "\$c = $c"; // returns nothing as $c isn't set /* returns will display this. $b = set */ ?>

« previous php.notes (#118569) next »