PHP Loop Through Array Upload Using FOR I Instead of FOREACH
How to Loop Through Uploaded Files Array Using a for( Loop Instead of foreach( Loop
Home
Short:
2 Ways to loop through $_FILES uploaded ...
foreach($_FILES as $key => $value){ $tmpname = $_FILES[$key]["tmp_name"]; $name = $_FILES[$key]["name"]; // etc ... }
for($i = 0; $i < count($_FILES); $i++ ){ $tmpname = $_FILES["inputfilename" . ($i + 1)]["tmp_name"]; $name = $_FILES["inputfilename" . ($i + 1)]["name"]; // etc ... }
source code home