I have the following multidimensional array, returned from a query:
Array
(
[0] => Array
(
[dimension] => string
[value_1] => 100
[value_2] => 200
)
What I'm looking to do is create this format instead, so I can access data within it by writing something like $data['dimension']['key']:
Array
(
[string] => Array
(
[dimension] => string
[value_1] => 100
[value_2] => 200
)
Is there a clean way to do this, or should I start playing with loops?