I have an empty array ($report), and i want to create a multidimensional array with element of "$array" The problem is that adds elements only for index = 2 (last interation). Why?
<?php
$array= array("3,4","5,6","7,8");
$report= array();
for($i=0, $n= count($array); $i< $n; $i++){
$lat= substr($array[$i],0,1);
$lng= substr($array[$i],2,1);
$report= array(array($lat,$lng));
}
echo "<pre>"; print_r($report);
?>
$report[]= array(array($lat,$lng));