I have the following generated by a for loop (the actual list is longer),
Array
(
[0] => Array
(
[0] => apple
[1] => 3
)
[1] => Array
(
[0] => orange
[1] => 1
)
)
How do I get the following with the keys (name,number) added?
Array
(
[0] => Array
(
[name] => apple
[number] => 3
)
[1] => Array
(
[name] => orange
[number] => 1
)
)