Re: mon question/problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<?php

 $dayselect = '<select name="form_date" id="form-date">';


 $month = 4;
 $day = 17;
 $year = 2003;


 for ($i = 0; $i < 170; $i++)
 {

  #Sunday || Saturday is not a bussiness day
  $numday = date('w', mktime(0,0,0,$month,$day+$i,$year));

  if ( ($numday != 0) && ($numday != 6) )
  {

   $date = date('l Y-m-d', mktime(0,0,0,$month,$day+$i,$year));
   $dayselect .= "<option value='$date'>$date</option>";

  }

 }


 $dayselect .= '</select>';


echo $dayselect;

?>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux