note 17223 added to control-structures.foreach

From: Date: Fri, 30 Nov 2001 03:04:17 +0000
Subject: note 17223 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-21467@lists.php.net to get a copy of this message
All the examples appear to use an array variable in the foreach function. However, that is not to say that you can't do the following (which saves creating a new variable).... foreach(array("apple","pear","orange","banana") as $val) echo "<li>$val"; -- http://www.php.net/manual/en/control-structures.foreach.php http://master.php.net/manage/user-notes.php?action=edit+17223 http://master.php.net/manage/user-notes.php?action=delete+17223 http://master.php.net/manage/user-notes.php?action=reject+17223

« previous php.notes (#21467) next »