Multiple selection / multiple upload

See all posts See thread Reply

Re: Multiple selection / multiple upload new!
by Mdc888, 14 years, 7 months ago
Thank you for the answer...
I thought I checked the FAQ...

Otherwise the code :
$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;
  }
}

Seems to be buggy... Executing it always give me an error on the line:
foreach ($l as $i => $v) {

The server is running PHP version 5.2

Do you have any idea?

ThanksReply
Re: Multiple selection / multiple upload new!
by colin, 14 years, 7 months ago
What is the error that you get? Can you dump here the content of the $_FILES array()?Reply