note 8856 added to foreach
| From: | david at petshelter dot net | Date: | Mon, 02 Oct 2000 16:57:45 +0000 |
| Subject: | note 8856 added to foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5963@lists.php.net to get a copy of this message | ||
When the array is an associative array, each element has two indexes: an integer and a string.
foreach() will generate *two* values for each element.
(You get an associative array when you use mysql_fetch_array() to retrieve a record from a query
result.)
http://www.php.net/manual/control-structures.foreach.php