I'm quite new to PHP and I'm havint some trouble understanding how I'm supposed to turn something like this:
Array
(
[name] => Array
(
[0] => Bob
[1] => Tom
[2] => Ryan
[3] => Lisa
[4] => Peter
)
[age] => Array
(
[0] => 23
[1] => 33
[2] => 43
[3] => 33
[4] => 29
)
)
Into this kind of an array:
Array
(
[person] => Array
(
[name] => Bob
[age] => 23
)
[person] => Array
(
[name] => Tom
[age] => 33
)
)
So I wan't to be able to have a person key, rather than name and age keys. And to put identical indexes from name and age into this person key. How would I go about achieving this?
Thanks.