How to convert month name array to number array
<p>Here i have defined my month name array</p>

<pre><code>$months = array(1 =&gt; 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
</code></pre>

<p>Below is the code i loop throgh it for getting the month names in a dropdown.</p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;Period From:&lt;span id="star"&gt;*&lt;/span&gt; 

        &lt;select name="monthfrom" id="monthfrom" style="width:60px"&gt;
            &lt;option value="Month"&gt;Month&lt;/option&gt;
            &lt;?php
            foreach ($months as $value) {
                echo '&lt;option value="' . $value . '"&gt;' . $value . '&lt;/option&gt;\n';
            }
            ?&gt;
        &lt;/select&gt;
    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>After excuting i want month names in the dropdown but value should be a two-digit month number (with leading zeroes).</p>
