for($i = 0; $i <= 7; $i++) {
$day=strtotime("+$i day");
echo '<option value="'. date('Y-m-d',$day) .'">'. date(' *your format here* ',$day).'</option>';
}
Jay Fitzgerald wrote:
Does anyone know how I can make a PHP form select box that has the dates in it for the next 7 days including today and the remaining days from this week?
eg: <SELECT NAME="date"> <OPTION VALUE="2003-04-05">Friday, April 5 <OPTION VALUE="2003-04-06">Saturday, April 6 <OPTION VALUE="2003-04-07">Sunday, April 7 <OPTION VALUE="2003-04-08">Monday, April 8 <OPTION VALUE="2003-04-09">Tuesday, April 9 <OPTION VALUE="2003-04-10">Wednesday, April 10 <OPTION VALUE="2003-04-11">Thursday, April 11 <OPTION VALUE="2003-04-12">Friday, April 12 <OPTION VALUE="2003-04-05">Saturday, April 13 <OPTION VALUE="2003-04-05">Sunday, April 14 </SELECT>
Jay Fitzgerald, Design Director Bayou Internet - http://www.bayou.com Toll Free: 888.30.BAYOU (22968) Vox: 318.338.2034 / Fax: 318.338.2506 E-Mail: [EMAIL PROTECTED] ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php