gadaschowdary
01-13-2010, 08:32 PM
how to generate 5 dates in a drop down list .
based on noofdays value that many dates should be generated. I am using this but it is giving 01/01/1970.
plz help
Reservation Date : </td>
<td align="left"><select name="ResrvDate" type="text" class="textbox" id="ResrvDate" value="">
<?$Count = 0;
while($Count < $NoOfDays){
$dates= date("m/d/Y",strtotime(date("m/d/Y", strtotime($date)) . " + " . $Count . " day")) . "<br />";
?>
<option value = "<?echo $dates?> "> <? echo $dates ?> </option>
<? $Count++;}?>
based on noofdays value that many dates should be generated. I am using this but it is giving 01/01/1970.
plz help
Reservation Date : </td>
<td align="left"><select name="ResrvDate" type="text" class="textbox" id="ResrvDate" value="">
<?$Count = 0;
while($Count < $NoOfDays){
$dates= date("m/d/Y",strtotime(date("m/d/Y", strtotime($date)) . " + " . $Count . " day")) . "<br />";
?>
<option value = "<?echo $dates?> "> <? echo $dates ?> </option>
<? $Count++;}?>