Hi, How can i make this dyn. with php?? <select name="mydropdown"> <option value="07.00-07.30">07.00-07.30</option> <option value="07.30-08.00">07.30-08.00</option> <option value="08.00-08.30">08.00-08.30</option> etc. </select> Code (markup): Any suggestions??
ah, found this php function which does the trick function create_time_range($start, $end, $by='30 mins') { /** * create_time_range * * @param mixed $start start time, e.g., 9:30am or 9:30 * @param mixed $end end time, e.g., 5:30 or 17:30 * @param string $by 1 hour, 1 mins, 1 secs, etc. * @access public * @return void */ $start_time = strtotime($start); $end_time = strtotime($end); $times = array(); for ( ;$start_time < $end_time; ) { $times[] = $start_time; $start_time = strtotime('+'.$by, $start_time); } $times[] = $start_time; return $times; } PHP: