for($i=0; $i<count($_FILES['foto']['name']); $i++) { if (!empty($_FILES['foto']['name'][$i])) { include('../incs_panel/galeria_insert.php'); } }