I am generating row of input with arrays.
@foreach($msp_temp as $current)
<td>
<input type="number" step ="0.01" class="required" name="firstEntry[]" id="firstEntry">
</td>
<td>
<input type="number" step ="0.01" class="required" name="secondEntry[]" id="secondEntry">
</td>
...
I have a variable set somewhere like:
var entrysum = 0
I want to insert the variable value (entrysum) inside the [] and increase the variable every loop.
How do I insert entrysum value into firstEntry[], secondEntry[], and increase the variable value by 1 after every loop?