month format php
<p>I am just a beginner in php. I am trying to print the array of months using the following code.</p>

<pre><code>&lt;?php
$totalmonth=12;
for($startmonth=01; $startmonth&lt;=$totalmonth; $startmonth++)
{
    $montharr[]=$startmonth;
}
print_r($montharr);
?&gt;
</code></pre>

<p>My result is <code>Array ( [0] =&gt; 1 [1] =&gt; 2 [2] =&gt; 3 [3] =&gt; 4 [4] =&gt; 5 [5] =&gt; 6 [6] =&gt; 7 [7] =&gt; 8 [8] =&gt; 9 [9] =&gt; 10 [10] =&gt; 11 [11] =&gt; 12 )</code> </p>

<p>I need my result should look like this</p>

<pre><code>[0] =&gt; 01 [1] =&gt; 02
</code></pre>

<p>How can i do that?</p>
