Time Loop

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

 



Hello All, I am trying to figure out how to loop through 2 given times. I have a start time and a end time and want to look through every X mins and add a radio button. Below is my latest try, can someone please help me out?


     $endTime = "17:00:00";
     $currentTime="09:00:00";

     $num_intervals = floor(($endTime - $currentTime) / 30);

     echo ("Num_INter: ".$num_intervals."</br>");

     $buffer_time = $currentTime;
     for($i = 0; $i < $num_intervals; $i++)
     {
       echo ("<tr>");
       echo ("<td>".$currentTime."</td>");

       foreach ($days as $day)
       {
           echo ("<td>");
echo ("<input type='radio' name='dateTimeSelection' value=$day>");

           echo ("</td>");
       }


       $buffer_time += $interval;
       echo ("</tr>");
     }



ps I was having problems with my news reader, this may be posted twice, if so. Sorry.

TIA

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux