select menu with current month until end of the year
<p>How do you make a select date menu using the current month until the end of the year?</p>

<p>For example... if displayed the drop down today it would show September to December only as options to the user.</p>

<p>This is the code I have so far but it shows months prior to September as well. </p>

<pre><code>    &lt;?php 
$curr_month = date("m");
$month = array (1=&gt;"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$select = "&lt;select name=\"month\"&gt;\n";
foreach ($month as $key =&gt; $val) {
    $select .= "\t&lt;option val=\"".$key."\"";
    if ($key == $curr_month) {
        $select .= " selected=\"selected\"&gt;".$val."&lt;/option&gt;\n";
    } else {
        $select .= "&gt;".$val."&lt;/option&gt;\n";
    }
}
$select .= "&lt;/select&gt;";
echo $select;
?&gt;
</code></pre>
