title: how to store multiple array of same name from one form
body: <p>suppose i m trying to store name,phone email of three person from one form here is my code..</p>
  
  <pre><code>&lt;form method="post" action="demo.php"&gt;
      &lt;input type="text" name="name[]"&gt;
      &lt;input type="text" name="phone[]"&gt;
      &lt;input type="text" name="email[]"&gt;
      &lt;br&gt;
      &lt;input type="text" name="name[]"&gt;
      &lt;input type="text" name="phone[]"&gt;
      &lt;input type="text" name="email[]"&gt;
      &lt;br&gt;
      &lt;input type="text" name="name[]"&gt;
      &lt;input type="text" name="phone[]"&gt;
      &lt;input type="text" name="email[]"&gt;
      &lt;br&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>now code of demo.php which is my action  page...</p>
  
  <pre><code>foreach(($_POST['name']as $id)
      {
          $name= mysql_real_escape_string($id);
  
          $query1 = "INSERT INTO list (name,phone,email) VALUES ('$name','$_POST[phone]',$_POST[email])";
          $query = mysql_query($query1);
      }
      if($query)
      {
          return true;
      }
      else{
          echo "Something Wrong";
      }
  </code></pre>
  
  <p>its storing name of three  people correctly but not storing phone and email of three people
  i tried with for loop also but not getting result,plz anyone tell me how to store multiple array from a single  form.</p>