note 8342 added to each
| From: | gateschris at yahoo dot com | Date: | Thu, 07 Sep 2000 03:52:14 +0000 |
| Subject: | note 8342 added to each | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4289@lists.php.net to get a copy of this message | ||
as royapav@millsaps.edu 24-May-1999 10:02 mentions:
the following code demonstrates the problem addressed by royapav:
<HTML><?PHP
$array1 = array ("hasdfkjl", "jdafkjalsd", "sadfjka;lk",
"1", "2");
while (list($key, $val) = each($array1))
{
print "first loop hi!\n";
}
print $array1[0];
while (list($key, $val) = each($array1))
{
print "second loop hi!\n";
}
?></HTML>
This piece of code only prints the first loop in php version 3
http://www.php.net/manual/function.each.php