select menu with current date
<p>How do you create a select with the option of 2 days ahead from today picked as the default option (i.e. a 48 hour window) in PHP? This is the code I'm using so far but it doesn't work unfortunately!</p>

<pre><code>&lt;?php
$weekday = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
$days = range (1, 31);
$currentDay = date('F');
echo "&lt;select name='weekday'&gt;";
foreach ($days as $value) {
  $default = ($value == $currentDay)?'selected="selected"':'';
  echo '&lt;option '.$default.' value="'.$value.'"&gt;'.$value."&lt;/option&gt;\n";
}
echo '&lt;/select&gt; &amp;nbsp; ';
?&gt;
</code></pre>
