<?php
ini_set('error_reporting', E_ALL); // error reporting
// save uploaded files
$i = 1;
while (list ($item, $value) = each ($_FILES)){
if(substr($item, 0, 11) == 'imageloader'){
$fileName = $i.'.'.substr($item, 11, 3); // make file name
move_uploaded_file($value['tmp_name'], $fileName); // save file
$i++;
}
}
?>
I need to use foreach. I have tried but it just doesn't work. Can anyone help me change the EACH
to a FOREACH
loop?