I convert a mysql result to a multidimensional array for easy cache storage.
$cacheres = array();
while($row = $result->fetch_assoc()) {
array_push(cacheres , $row);
}
Depending of which I use, fetch_assoc or fetch_object makes an array with arrays or stdClass objects.
Which is better? I prefer the object way but I'm not sure if it uses more memory or is slower?