My app is interacting with a web service that returns an indexed array of associative single-element arrays such as:
Array
(
[0] => Array
(
[Price] => 1
)
[1] => Array
(
[Size] => 7
)
[2] => Array
(
[Type] => 2
)
)
That's not a problem, but the problem is that the service keeps changing the index of those items, so in the next array the Price could be at 1 instead of 0.
How do I efficiently transform arrays like this into a single dimension array so I can access the variables through $var['Size'] instead of $var[1]['Size']?