daveh33 Posted November 20, 2007 Share Posted November 20, 2007 What is the best way to add a drop down menu to generate the below html Send When?<br> <select name="date"> <selected><option value="20-11-2007">20-11-2007</option></selected> <option value="21-11-2007">21-11-2007</option> <option value="22-11-2007">22-11-2007</option> <option value="23-11-2007">23-11-2007</option> <option value="24-11-2007">24-11-2007</option> <option value="25-11-2007">25-11-2007</option> <option value="26-11-2007">26-11-2007</option> <option value="27-11-2007">27-11-2007</option> <option value="28-11-2007">28-11-2007</option> <option value="29-11-2007">29-11-2007</option> <option value="30-11-2007">30-11-2007</option> </select> DD-MM-YYYY<br> Link to comment https://forums.phpfreaks.com/topic/78057-solved-drop-down-menu-with-todays-date-next-10-days/ Share on other sites More sharing options...
rajivgonsalves Posted November 20, 2007 Share Posted November 20, 2007 try this Send When?<br> <select name="date"> <?php for ($i=0;$i<=10;$i++) { $strDate = date("d-m-Y",strtotime("+$i day")); echo "<option value=\"$strDate\">$strDate</option>"; } ?> </select> DD-MM-YYYY<br> Link to comment https://forums.phpfreaks.com/topic/78057-solved-drop-down-menu-with-todays-date-next-10-days/#findComment-395070 Share on other sites More sharing options...
daveh33 Posted November 20, 2007 Author Share Posted November 20, 2007 Thats great cheers mate. RE: random image font, my server has just crashed but will test it once its back online Thanks for your help Link to comment https://forums.phpfreaks.com/topic/78057-solved-drop-down-menu-with-todays-date-next-10-days/#findComment-395076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.