我在$ _Files中有2个关联数组,无法弄清楚如何循环它们。以下是print_r($ _ FILES)结果:
Array
(
[userfile] => Array
(
[name] => Lilly-Pond-Leo-Kenney.jpg
[type] => image/jpeg
[tmp_name] => C:\wamp\tmp\php189.tmp
[error] => 0
[size] => 429950
)
[userfile1] => Array
(
[name] => LK-3-women.jpg
[type] => image/jpeg
[tmp_name] => C:\wamp\tmp\php18A.tmp
[error] => 0
[size] => 79391
)
)
我无法弄清楚如何从[userfile]循环到[userfile1]。任何帮助将不胜感激
答案 0 :(得分:0)
foreach($_FILES as $file)
{
//use this loop and remove print_r();
print_r($file);
}