note 17223 deleted from control-structures.foreach by sniper
| From: | sniper@php.net | Date: | Wed, 08 Oct 2003 04:10:43 +0000 |
| Subject: | note 17223 deleted from control-structures.foreach by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58015@lists.php.net to get a copy of this message | ||
Note Submitter: andrew at crucible.co.nz
----
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";