class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
$files = Array (); foreach ($_FILES [ââ?¬Å?my_fieldââ?¬Â] as $k => $l) { foreach ($l as $i => $v) { if (!array_key_exists ($i, $files)) $files [$i] = Array (); $files [$i] [$k] = $v; } } }
die('FILES: '.print_r($_FILES, 1));
Note the as in the foreach declarations.
Now, can you add this line before your foreach, and copy and paste here what it outputs?