title: How to get an array of data from $_POST
body: <p>I have a form with multiple textboxes with the same names. I want to get the data from all the textboxes in my PHP code.</p>
  <p>Here is my code.</p>
  <pre class="lang-html prettyprint-override"><code>Email 1:&lt;input name=&quot;email&quot; type=&quot;text&quot;/&gt;&lt;br/&gt;
  Email 2:&lt;input name=&quot;email&quot; type=&quot;text&quot;/&gt;&lt;br/&gt;
  Email 3:&lt;input name=&quot;email&quot; type=&quot;text&quot;/&gt;&lt;br/&gt;
  </code></pre>
  <pre class="lang-php prettyprint-override"><code>$email = $_POST['email'];
  echo $email;
  </code></pre>
  <p>I wanted to have a result like this:</p>
  <blockquote>
  <p>email1@email.com, email2@email.com, email3@email.com</p>
  </blockquote>
  <p>Instead I only get the text from the last textbox.</p>