Changing the date format of a variable in php
<p>If I've got a variable with the value: <code>May-2012</code>, how do I change the format of the variable to <code>2012-05-01</code>;</p>

<p>eg:</p>

<pre><code>$data1 = 'May-2012';
$data2 = $data1('Y-m-01');
</code></pre>
