I am getting the array from a api request for images which is the format as shown below. This array is very difficult to traverse and difficult for me to upload. I want a array in the single index which contains all the information of a single image. I have below given error:
Array
(
[name] => Array
(
[0] => prog-programming_00267956.png
[1] => programming-wallpaper_17695.jpg
)
[type] => Array
(
[0] => image/png
[1] => image/jpeg
)
[tmp_name] => Array
(
[0] => /tmp/php0azGbU
[1] => /tmp/phpyByFGB
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 587659
[1] => 83817
)
)
I have to convert it to:
Array
(
[0] => Array
(
[name] => prog-programming_00267956.png
[type] => image/png
[tmp_name] => /tmp/phphSShmd
[error] => 0
[size] => 587659
)
[1] => Array
(
[name] => prog-programming_00267956.png
[type] => image/png
[tmp_name] => /tmp/phphSShmd
[error] => 0
[size] => 587659
)
)
So how to convert array into the above format.