I have a dynamic form that allows someone to add a row that has 2 input types. The first one can be an image or text field and the second one is always a text field. I need the first field to be tied with the second field in post. So I can add to a database field1A and field2A in the same row. The issue is that a file upload is in its own array so I can't just loop through my text array and know that the image is tied to that text field.
<input type="text" name="field1[]">
If I loop through my field1[] array and get the index it will be different than my $_Files and I don't know where in the array my files are.
Field1 | Field2
-----------------------
A text | text
-----------------------
B file upload | text
-----------------------
field[0][text],field[0][file],field[1][text],field[1][file], etc. If you include more of your code, we can advise how you can change it to accomplish this.