Kijk alsjeblieft, je kunt een idee krijgen van meerdere uploadshttp:// php.net/manual/en/features.file-upload.multiple.php
Zie onderstaand voorbeeld
<?php
print_r($_FILES);
?>
<form action="" method="post" enctype="multipart/form-data">
Send these files:<br />
<input name="userfile[]" type="file" /><br />
<input name="userfile[]" type="file" /><br />
<input type="submit" value="Send files" />
</form>
Zie resultaat hieronder
Array
(
[userfile] => Array
(
[name] => Array
(
[0] => cancelled booking - PAYG.png
[1] => cancelled booking - PAYG.png
)
[type] => Array
(
[0] => image/png
[1] => image/png
)
[tmp_name] => Array
(
[0] => C:\xampp\tmp\php402A.tmp
[1] => C:\xampp\tmp\php402B.tmp
)
[error] => Array
(
[0] => 0
[1] => 0
)
[size] => Array
(
[0] => 99134
[1] => 99134
)
)
)
Voor uw vraag is het volgende foreach
<?php
foreach ($_FILES['userfile'] as $position => $file){
print_r($file);
}
?>
Wanneer resultaat daarvoor Zie hieronder:
Array
(
[0] => cancelled booking - PAYG.png
[1] => cancelled booking - PAYG.png
)
Array
(
[0] => image/png
[1] => image/png
)
Array
(
[0] => C:\xampp\tmp\php284D.tmp
[1] => C:\xampp\tmp\php284E.tmp
)
Array
(
[0] => 0
[1] => 0
)
Array
(
[0] => 99134
[1] => 99134
)
Dus nu kun je het begrijpen
BedanktPratik