Combining an Array
Posted: Mon Sep 24, 2007 1:01 am
Hey Guys, I have the following array:
What PHP function could I use to join the sub-array's together?
For Example, I want:
etc.
Notice, in the above, the array is made up of all the [0]'s in the other array.
Thanks.
Code: Select all
Array (
[uploadfile] => Array (
[name] => Array (
[0] => icon.png
[1] => cp-icon.gif
[2] => plans.php
[3] =>
)
[type] => Array (
[0] => image/x-png
[1] => image/gif
[2] => application/octet-stream
[3] =>
)
[tmp_name] => Array (
[0] => /tmp/phpvRI6oR
[1] => /tmp/phpvYUxmw
[2] => /tmp/phpfRz3jb
[3] =>
)
[error] => Array (
[0] => 0
[1] => 0
[2] => 0
[3] => 4
)
[size] => Array (
[0] => 18541
[1] => 5347
[2] => 8734
[3] => 0
)
)
)For Example, I want:
Code: Select all
Array {
[Filename] => icon.png
[Filetype] => image/x-png
[Tempname] => /tmp/phpvRI6oR
[Error] => 0
[Filesize] => 18541
}Notice, in the above, the array is made up of all the [0]'s in the other array.
Thanks.