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;
}
?>