Inserting more than one array into same row
foreach loops over a single variable. Here you have two, so using foreach is not the right method. Or you’d have to add a $i index inside the loop to get the second variable. But there’s a simpler way: $total = count($_POST[‘file_name’]); for($i = 0; $i < $total; $i++) { $file_name = $_POST[‘file_name’][$i]; $file = … Read more