note 10171 added to foreach
| From: | no at mail dot com | Date: | Sat, 16 Dec 2000 21:15:19 +0000 |
| Subject: | note 10171 added to foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8793@lists.php.net to get a copy of this message | ||
If you want to do a foreach loop on a bunch of variables, use:
foreach(array($foo,$bar,$bah) as $value)
{
//variable is $value
}
http://www.php.net/manual/control-structures.foreach.php