$fields = array('field_name1', 'field_name2', 'etc...'); for($i=0; $i<sizeof($fields); $i++){ //do something with the input }
for($i=0; $i<$number_of_fields; $i++){ $input = $_FILES['field'.$i]; //do something with the input }