My code is
$sql = 'select * from table;' $res = $connection->query($sql);
while($row = mysqli_fetch_row($res){'tackle output'};
to get an object
while($row = $res->fetch_object()){'tackle output'};
Question: what do I have to do to get an array of objects, so my output is thus
$data[$row[0]]= fetch_object();
fecth_associs an array.$row['fieldName'], i need an array of objects.