increment the i
<pre><code>for(var i=1;i&lt;=($("input:regex(id,[0-9]+)").length);i++)
{
    array.push($("#i").val());
} 
</code></pre>

<p>Hey, I am tying to store the input value in the array. Each of the input has distinct id associated with it, in this case, 1,2,3,4 and so on. How can I change the i in </p>

<pre><code>array.push($("#i").val());
</code></pre>

<p>accordingly with the counter i in the for loop, which would fetch the value from inputs. like if I got two inputs fields, whose ids are 1 and 2. After this codes execution, the array has two elements that are from the inputs. Thank you </p>
