title: foreach() how to get value of every textbox in that "group" of inputs
body: <p>Right now i am trying to make a customer management system, where i can add multiple customers at the same time.</p>
  
  <p>I have a javascript script which allows me to add new rows of information that i can fill in, about customers, but my problem here is that how do i get all the information, separately for every row.</p>
  
  <p>A html example is this:</p>
  
  <pre><code>&lt;input type="text" name="name[]" /&gt;
  &lt;input type="text" name="lastname[]" /&gt;
  &lt;input type="text" name="dob[]" /&gt;
  &lt;hr&gt;
  &lt;input type="text" name="name[]" /&gt;
  &lt;input type="text" name="lastname[]" /&gt;
  &lt;input type="text" name="dob[]" /&gt;
  </code></pre>
  
  <p>And this can keep on going for ever, until i dont need more fields.</p>
  
  <p>As i need to enter the information to the database individually for each row, i need a script to automatically take those 3 fields, and put in into a mysql command like this</p>
  
  <pre><code>mysqli_query($con, "INSERT INTO customers (name, lastname, dob) VALUES ('" . $name . "', '" . $lastname . "', '" . $dob . "'");
  </code></pre>
  
  <p>and this it needs to do for every row there is.</p>
  
  <p>I have tried to make something with foreach and nested foreach, but i can't seem to make it work.</p>
  
  <p>Thanks in advance.</p>