Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $startTime = 01:00:00;
- $endTime = 07:00:00;
- <select class="" name="time">
- <?php while($endTime != $startTime){
- $s = $startTime;
- $e = date("H:i:s", strtotime("$startTime + 1 hours"));
- ?>
- <option value="1"><?php echo date('g:i a', strtotime($s)); ?> - <?php echo date('g:i a', strtotime($e)); ?></option>
- <?php $startTime = $e;
- }?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement