I have an array like the first picture below. Is it possible to re-arrange the array position like the second picture below? So that it can arranged file0, file1, file2 and so on.
Multiple Array
Single Array
Never mind, I solved my own answer by sorting like this
$count = count($_FILES['file']['name']);
$sort_arr = [];
for ($i=0; $i < $count; $i++) {
$sort_arr['file'.$i]['name'] = $_FILES['file']['name'][$i];
$sort_arr['file'.$i]['type'] = $_FILES['file']['type'][$i];
$sort_arr['file'.$i]['tmp_name'] = $_FILES['file']['tmp_name'][$i];
$sort_arr['file'.$i]['error'] = $_FILES['file']['error'][$i];
$sort_arr['file'.$i]['size'] = $_FILES['file']['size'][$i];
}
name[0], error[0], size[0]is one file andname[1], error[1], size[1]is another file?name,erroretc arrays have the same size?name[0], error[0], size[0] is one file and name[1], error[1], size[1] is another file and so onbut the value of each indexes are different