A day choice menu

 
<?
$midnight_today = mktime(0,0,0);
print '<select name="date">';
for ($i = 0; $i < 7; $i++) {
    $timestamp = strtotime("+$i day", $midnight_today);
    $display_date = strftime('%A, %B %d, %Y', $timestamp);
    print '<option value="' . $timestamp .'">'.$display_date."</option>\n";
}
print "\n</select>";
?>
  
  








Related examples in the same category

1.Form select input
2.An HTML Form Including a SELECT Element
3.A
4.An HTML Form with a select Element
5.Validating a drop-down menu with in_array()
6.Displaying a
7.Generating a dynamic pull-down menu
8.Setting a default value in a
9.Setting defaults in a multi-valued
10.Creating Form Elements Based on the Current Time and/or Date
11.Creating Form Elements with Multiple Options
12.One choice for each day from 1 to 31
13.One choice for each year from last year to five years from now