Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

mysql_fetch_all (See related posts)

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

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

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts