note 8874 added to foreach
| From: | david at petshelter dot net | Date: | Tue, 03 Oct 2000 16:36:28 +0000 |
| Subject: | note 8874 added to foreach | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5986@lists.php.net to get a copy of this message | ||
The problem with foreach returning 2 values from an associative array returned by
mysql_fetch_array() can be solved by using mysql_fetch_row() which returns an array indexed only by
integers or mysql_fetch_assoc() which returns an array indexed only by strings.
http://www.php.net/manual/control-structures.foreach.php