title: Create a dropdown for months using a php function.
body: <p>I am using this function to create a dropdown for months. </p>
  
  <pre><code>function formMonth(){
    $month = strtotime(date('Y').'-'.date('m').'-'.date('j').' - 12 months');
    $end = strtotime(date('Y').'-'.date('m').'-'.date('j').' + 0 months');
    while($month &lt; $end){
        $selected = (date('F', $month)==date('F'))? ' selected' :'';
        echo '&lt;option'.$selected.' value="'.date('F', $month).'"&gt;'.date('F', $month).'&lt;/option&gt;'."\n";
        $month = strtotime("+1 month", $month);
    }
  }
  </code></pre>
  
  <p>My problem is I need to use numeric values of 1 to 12 for option values. </p>
  
  <p>At this time it use month name for <code>value</code> options like this. </p>
  
  <pre><code>&lt;select size="1" name="month"&gt;
  &lt;option selected value="January"&gt;January&lt;/option&gt;
  &lt;option value="February"&gt;February&lt;/option&gt;
  &lt;option value="March"&gt;March&lt;/option&gt;
  &lt;option value="April"&gt;April&lt;/option&gt;
  &lt;option value="May"&gt;May&lt;/option&gt;
  &lt;option value="June"&gt;June&lt;/option&gt;
  &lt;option value="July"&gt;July&lt;/option&gt;
  &lt;option value="August"&gt;August&lt;/option&gt;
  &lt;option value="September"&gt;September&lt;/option&gt;
  &lt;option value="October"&gt;October&lt;/option&gt;
  &lt;option value="November"&gt;November&lt;/option&gt;
  &lt;option value="December"&gt;December&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Can anybody tell me how to modify this function. 
  Thank you. </p>