Sorry for the title. its little difficult for me to explain. I've spent almost few hours to figure this out, but failed. So I'm posting it here.
I have following array
Array
(
[0] => Array
(
[0] => a
[1] => b
[2] => c
)
[1] => Array
(
[0] => p
[1] => q
[2] => r
)
[2] => Array
(
[0] => w
[1] => x
[2] => y
[3] => z
)
)
The array could have any number of elements.
What i need to do is create another array based on above array.
Array
(
[0] => Array
(
[0] => a
[1] => p
[2] => w
)
[1] => Array
(
[0] => b
[1] => q
[2] => x
)
[2] => Array
(
[0] => c
[1] => r
[2] => y
)
[3] => Array
(
[0] => Z
)
)
Any hints will be appreciated.
Thanks