title: Modifying $i inside a form
body: <p>so I have a form. The form consists of 10 lines by default. It goes like this:</p>
  
  <pre><code>&lt;form method="post" action="actionhere"&gt;
  &lt;?php 
     for($i=0; $i&lt;10;$i++) {
  ?&gt;
       &lt;div class='clone_me'&gt;
       &lt;span&gt;Line &lt;?php echo $i;?&gt;&lt;/span&gt;
  
       &lt;input type='checkbox' name='ck_&lt;?php echo $i;?&gt;'/&gt;
       &lt;input type='text' name='tx_&lt;?php echo $i;?&gt;'/&gt;
       &lt;/div&gt;
  &lt;?php } ?&gt;
  &lt;input type='submit' name='submit' value='Submit'/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So inside the form, we will have 10 rows of checkbox+textbox.</p>
  
  <p>What I'm trying to make is, I want to place a button to add new row (the checkbox+textbox). Now, problem is, I need the $i value (since it's form the for loop). Is that possible that when we click the add row button, the value of $i that we set inside for loop be incremented by 1 on each click? I know we can clone the div using jquery, but how about the $i value?</p>