Forum Moderators: coopster
Suppose I have an array:
$arr = array(0 => array("AAB", 10.0, 2000), 1 => array("ABC", 12.2, 3000));
I want to change this conveniently into
$arr = array("AAB" => array(10.0, 2000), "ABC" => array(12.2, 3000));
Of course one may assume that the strings in this array are all unique. Is there a standard way to do this other than to traverse the original array to populate the new array?
Best wishes
Tech