title: How to store multiple text box values in array
body: <p>Is it possible to store multiple textbox values in array, i have N number of textboxes</p>
  
  <pre><code>&lt;input type="text" name="grade[]" id="grade" /&gt;
  &lt;input type="text" name="grade[]" id="grade" /&gt;
  &lt;input type="text" name="grade[]" id="grade" /&gt;
  </code></pre>
  
  <p>i tried this code to add all the text box value but it returns only the last text box value.</p>
  
  <pre><code>    $grade=$_POST['grade'];
  for($i=1;$i&lt;=3;$i++)
  {
      $per=$grade[$i]*$grade[$i];
      echo $per;
  }
  </code></pre>