Upload more, how to catch the first and second values?

I used an ajax multi-upload upload
has been able to upload more

$fileCount = count($_FILES["icon"]["name"]);

    for ($i = 0; $i < $fileCount; $iPP) {

      $file = $_FILES["icon"]["tmp_name"][$i];
      $dest = "../../images/admin/product/" . $_FILES["icon"]["name"][$i];

      move_uploaded_file($file, $dest);
    }

it"s just that I want to process
the first movie
and
the second film separately

now.

first order I want to update a certain number table
I want to write in the number table after the second round (deal with it with foreach,)
it"s just that I don"t know how I can catch these two tables?


it's OK to use the for loop. You upload more than one picture at a time to make a three-dimensional array.
all you have to do is read the subscript of name,type,tmp_name,error,size in a loop.
$iTun0 is the beginning
then you execute update
else
execute insert


when you judge that it is equal to 0 in the loop.

I wonder if this is what I mean?

$fileCount = count($_FILES['icon']['name']);
$files = [];

    for ($i = 0; $i < $fileCount; $iPP) {

      $file = $_FILES['icon']['tmp_name'][$i];
      $dest = '../../images/admin/product/' . $_FILES['icon']['name'][$i];

      move_uploaded_file($file, $dest);
      $files[] = $dest;
}

$first = true;
foreach($files as $file){
    if($first){
        $first = false;
        // update xxx
    }else{
        // insert xx
    }
}

$fileCount = count($_FILES['icon']['name']);

for ($i = 0; $i < $fileCount; $iPP) {

  $file = $_FILES['icon']['tmp_name'][$i];
  $dest = '../../images/admin/product/' . $_FILES['icon']['name'][$i];
  move_uploaded_file($file, $dest);

  if($i == 0){
     // Update  
  }else{
     // Insert 
  }  

}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b388cf-2c109.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b388cf-2c109.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?