这可能是个愚蠢的问题,但是 PHP 数组 $_FILES 的格式非常奇怪,我以前从未使用过。有人可以告诉我如何以理智的方式迭代这个数组吗?我曾经迭代对象或对象之类的数组,但这种格式对我来说很奇怪。有没有办法像对象数组一样迭代这个数组?
( [attachments] =>
Array (
[name] => Array (
[0] => test1.png
[1] => test2.png
)
[type] => Array (
[0] => image/png
[1] => image/png
)
[tmp_name] => Array (
[0] => /tmp/phpmFkEUe
[1] => /tmp/phpbLtZRw
)
[error] => Array (
[0] => 0
[1] => 0
)
[size] => Array (
[0] => 9855
[1] => 3002
)
)
)