note 59703 added to function.mysql-fetch-assoc
| From: | php-general at lists dot php dot net | Date: | Tue, 13 Dec 2005 23:25:36 +0000 |
| Subject: | note 59703 added to function.mysql-fetch-assoc | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100092@lists.php.net to get a copy of this message | ||
The following code retrieves all rows but adds an empty array element to the end:
while ($arr[] = mysql_fetch_assoc($result));
One way to remove it is to also execute the following:
array_pop($arr);
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-assoc.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59703
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59703&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59703&report=yes
Search -- http://master.php.net/manage/user-notes.php