MySQL Fetch All Function

Submitted by:Andery Smith

Date added:12 August, 2012

Category:MySQL

Simple but utilitarian function returns a numeric array of associative arrays containing an entire result set.

Tags: mysql function , fetch function

Code Snippet:

function mysql_fetch_all($result) {
$all = array();
while ($all[] = mysql_fetch_assoc($result)) {}
return $all;
}
 
 

Comments