I am using dropzone to get the files uploaded to my Folder. Successfully getting the array of files.
foreach($_FILES as $file) {
print_r($file);
}
Current Output:
Array
(
[name] => Array
(
[0] => Image.PNG
[1] => sadssadsa.PNG
)
[type] => Array
(
[0] => image/png
[1] => image/png
)
[tmp_name] => Array
(
[0] => C:\Users\CH MANAN\AppData\Local\Temp\php48B6.tmp
[1] => C:\Users\CH MANAN\AppData\Local\Temp\php48B7.tmp
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 291647
[1] => 112790
)
)
Expected output:
array
(
[0] => array
(
[name] => Image.PNG
[type] => image/png
[tmp_name] => C:\Users\CH MANAN\AppData\Local\Temp\php48B6.tmp
[error] => 0
[size] => 291647
)
[1] => array
(
[name] => sadssadsa.PNG
[type] => image/png
[tmp_name] => C:\Users\CH MANAN\AppData\Local\Temp\php48B7.tmp
[error] => 0
[size] => 112790
)
)
Tried various loops in the parent loop but not getting the expected results. Someone can help here.