multiple upload resize images

See all posts Reply

multiple upload resize images new!
by jay, 16 years, 8 months ago
Looking at upload.php file Im tying to set multiple upload images but it doesn't work.. I get this error: Invalid argument supplied for foreach()
include('class.upload.php');
$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;
    }
}

foreach ($files as $file) {
    $handle = new Upload($file);
    if ($handle->uploaded) {
       // [...]
    }
}
Reply
Re: multiple upload resize images new!
by colin, 16 years, 8 months ago
What does it print out if you add the following line?
echo print_r($files, 1);
foreach ($files as $file) {
Reply