title: How to post an array to MySQL
body: <p>How can we post following array to mysql(columns: id, date, amount)...</p>
  
  <pre><code>Array
  (
     [date] =&gt; Array
     (
        [0] =&gt; 03/27/2011
        [1] =&gt; 04/27/2011
      )
     [amount] =&gt; Array
     (
        [0] =&gt; 5000
        [1] =&gt; 5000
      )
  )
  </code></pre>
  
  <p>How can we get data(dates and amounts) from this array to post intomysql using foreach?</p>
  
  <p>we are getting this array using following fields btw...</p>
  
  <pre><code>&lt;input type="text" name="payment[date][]" /&gt; &lt;input type="text" name="payment[amount][]" /&gt;
  &lt;input type="text" name="payment[date][]" /&gt; &lt;input type="text" name="payment[amount][]" /&gt;
  </code></pre>
  
  <p>thanks for your support.</p>