title: Retrieve post array values
body: <p>I have a form that sends all the data with jQuery <code>.serialize()</code> In the form are four <code>arrays qty[], etc</code> it send the form data to a sendMail page and I want to get the posted data back out of the arrays.</p>
  
  <p>I have tried:</p>
  
  <pre><code>$qty = $_POST['qty[]'];
  foreach($qty as $value)
  {
    $qtyOut = $value . "&lt;br&gt;";
  }
  </code></pre>
  
  <p>And tried this:</p>
  
  <pre><code>for($q=0;$q&lt;=$qty;$q++)
  {
   $qtyOut = $q . "&lt;br&gt;";
  }
  </code></pre>
  
  <p>Is this the correct approach?</p>