I have a form with a set of input fields:
<form>
<div class="row">
<input type="text" name="product[1]">
<input type="text" name="qty[1]">
</div>
</form>
I also add new rows dynamically to the DOM with jquery's clone() function.
What is the best way to increase the index number? Or is there a better way to 'map' the product and qty fields before submitting to a PHP script?
product[]andqty[], PHP will deal your data like an arrayproduct[]without indexproduct[42]is related toqty[42](and vice-versa)