while(@temp_array = $sql->fetchrow_array ){ $output[$i] = [ @temp_array ]; $i++; }