title: Format dates inside array, implode and insert into database
body: <p>I am imploding various arrays and then inserting them into a database to then later retrieve them and explode them into their original arrays. I want to do this with an array of dates but I need to format them before inserting. </p>
  
  <p>How can I format the dates in the array and then pass it to the <code>implode()</code> function to insert it into the database? Similarly I will need to explode it an reformat the array upon retrieval. </p>
  
  <p>The structure of the array is very simple </p>
  
  <pre><code>$array = (
             [0] =&gt; 02/09/2013
             [1] =&gt; 29/03/2012
             [2] =&gt; 13/12/2010
           )
  </code></pre>
  
  <p>I am guessing it will require a foreach loop to cycle through it and format each date but how can I return the formatted array to then pass it to implode?</p>