note 93167 added to function.dba-firstkey
| From: | rcracer91 at gmail dot com | Date: | Wed, 26 Aug 2009 19:21:21 +0000 |
| Subject: | note 93167 added to function.dba-firstkey | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159908@lists.php.net to get a copy of this message | ||
I wondered why it wasn't already written, so I did because I think working with associative
arrays is always as comfortable as can be
<?php
function dba_fetch_assoc($handle) {
$assoc = array();
for($k = dba_firstkey($handle); $k != false; $k = dba_nextkey($handle)) {
$assoc[$k] = dba_fetch($k, $handle);
}
return $assoc;
}
?>
----
Server IP: 194.153.94.10
Probable Submitter: 77.56.97.9
----
Manual Page -- http://www.php.net/manual/en/function.dba-firstkey.php
Edit -- https://master.php.net/note/edit/93167
Del: integrated -- https://master.php.net/note/delete/93167/integrated
Del: useless -- https://master.php.net/note/delete/93167/useless
Del: bad code -- https://master.php.net/note/delete/93167/bad+code
Del: spam -- https://master.php.net/note/delete/93167/spam
Del: non-english -- https://master.php.net/note/delete/93167/non-english
Del: in docs -- https://master.php.net/note/delete/93167/in+docs
Del: other reasons-- https://master.php.net/note/delete/93167
Reject -- https://master.php.net/note/reject/93167
Search -- https://master.php.net/manage/user-notes.php