Say I have a multidimensional, numeric zero-indexed array that looks like this:
$oldArray = (
0 => array("importantKey" => "1", "otherKey" => "someValue"),
1 => array("importantKey" => "4", "otherKey" => "someValue"),
);
What's the cleanest way to map this to the following, provided I can be sure of the uniqueness of "importantKey"
$newArray = (
1 => array("otherKey" => "someValue"),
4 => array("otherKey" => "someValue"),
);
This is useful when retrieving multiple rows from a database after doing a GROUP BY clause on "importantKey"