Reply to Re: Multiple selection / multiple upload

Re: Multiple selection / multiple upload new!
by Mdc888, 14 years, 1 month 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

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important