I have an array (produced by uploading multiple files) that returns this:
Array
(
[name] => Array
(
[0] => lightshow.png
[1] => mia.guyana.jpg
[2] => skanking.jpg
)
[type] => Array
(
[0] => image/png
[1] => image/jpeg
[2] => image/jpeg
)
[tmp_name] => Array
(
[0] => /Applications/MAMP/tmp/php/phph7f4nD
[1] => /Applications/MAMP/tmp/php/phppS2YDH
[2] => /Applications/MAMP/tmp/php/phptebtKr
)
[error] => Array
(
[0] => 0
[1] => 0
[2] => 0
)
[size] => Array
(
[0] => 160325
[1] => 153524
[2] => 29054
)
)
I need to pull each key value pair into a seperate array within a foreach loop for processing that would return something like this:
Array
(
[name] => lightshow.png
[type] => image/png
[tmp_name] => /Applications/MAMP/tmp/php/phph7f4nD
[error] => 0
[size] => 160325
)
Any ideas?
Thanks guys, I eventually answered my own question after testing out jsaloen & Sean’s answers which were both close, but not quite what I wanted. My solution may probably be kind of ham-handed, but it works!
I haven’t tried out deceze’s answer yet, I don’t quite understand it yet! It utilizes stuff that I haven’t learned yet!