$i=0;
$array=array("one","two");
foreach($array as &$point)
{
$point[$i]=array($point[$i], $i);
$i++;
}
var_dump($array);
yields:
array(2) { [0]=> string(3) "Ane" [1]=> &string(3) "tAo" }
I was expecting something more like:
[0]=> [0]=> "one" [1]= 1
[1]=> [0]=> "two" [1]= 2
Am I doing the inner block of the foreach wrong, or is there another method I should be using to go from a single to a 2D array?