Basically, I have an array where each element is a key/value pair of elements, like this:
[myArray] => Array
[0] => Array
[id] => 121
[name] => Value1
[1] => Array
[id] => 125
[name] => Value2
[2] => Array
[id] => 129
[name] => Value3
....
And I want to convert this to:
[myArray] => Array
[121] => Value1
[125] => Value2
[129] => Value3
....
so the 'id' element becomes the key, and the 'name' element becomes the value. Does PHP have something built in (or is there a clever trick) to do this? I'd like to avoid the obvious foreach() loop if there's something cleaner available...