note 37736 added to function.mysql-fetch-array
| From: | brendan at rn2 dot php dot net | Date: | Tue, 25 Nov 2003 02:03:08 +0000 |
| Subject: | note 37736 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60940@lists.php.net to get a copy of this message | ||
Often I need to store the entire result as an array, not just a single row... so I wrote this simple
function.
<?php
function mysql_fetch_array_r($result, $fetch = MYSQL_BOTH){
while ($row = mysql_fetch_array($result,$fetch)){
$whole_result[] = $row;
}
return $whole_result;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37736
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37736&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37736&report=yes
Search -- http://master.php.net/manage/user-notes.php