Im working on a php script to take an existing csv file (we'll call this one the template) and open it in a page and populate editable text fields with it's data between 1 and 50 times(user decides how many), which once edited to the users wishes, can then all be saved into a single combined csv file, separate from the template.
I included a link to a diagram of how i need this to work. I can open a csv, i can edit and save the csv, but i dont know how to dynamically take the number of clones the user needs, and render the template that many times in a way that when user is done, all fields are joined as rows of a single csv and saved to a new file.
The area highlighted in red, is the area im having trouble with.
The templates contain approx 25 fields, so each instance of the template (clone) will have 25 editable fields that are populated with the original data. Im confident that i can do this myself, but i need pointed in the right direction as to how to dynamically set the number of clones of the original template, and then combine said clones as rows in a single csv file once finished.