execute($sql); $result = $tmp->get_result(); while ($row = mysql_fetch_assoc($result)) { $position[$row["id"]] = $row["latitude"] . ", " . $row["longitude"]; $id[] = $row["id"]; } $m->free_result(); ?>