I have two rows (longitude and latitude) in my MySQL table. I want to get the two rows into a 2-dimensional array such that when the values (longitude and latitude) change in the database the values will be added to the array. Not that the values will be updated.
while($mRow = $resultMarker->fetch_assoc()){
$myArrayForMarkers [] = $mRow['latitude'];
$myArrayForMarkers [] = $mRow['longitude'];
}
print_r($myArrayForMarkers);
The issue I have in the code above is that instead of the new values to be added from the database to the array, the values in the array are being updated. Any help would be appreciated.