Try this one: echo "<select>" ; for ($d=0 ; $d <7 ; $d++) echo "<option onchange=\"javascript:document.location.href='link'\">".date("d/m/y", strtotime("+$d day"))."\n " ; echo "</option> </select>" ;
----- Original Message ----- From: "Miguel Brás" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 13, 2002 4:15 AM Subject: [PHP] Drop down list with date > Hello guys, > > I have a question: > > How can I create a drop down menu where the choices are the days of the > month, displaying always the next 7 days? > > What I mean is, create a drop down menu and show the today's date, next day, > and next... > > Example: Today is 12th, then the menu shows the following option to be > choosen > 12/11/02 > 13/11/02 > 14/11/02 > 15/11/02 > 16/11/02 > 17/11/02 > 18/11/02 > > Tomorrow 13th will display > 13/11/02 > 14/11/02 > 15/11/02 > 16/11/02 > 17/11/02 > 18/11/02 > 19/11/02 > > and so on... > > Thx > Regards > Miguel > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php