Skip to content

Instantly share code, notes, and snippets.

@vanessa
Created March 15, 2017 22:49
Show Gist options
  • Save vanessa/e3d295fd87395c62139308b2965b06b8 to your computer and use it in GitHub Desktop.
Save vanessa/e3d295fd87395c62139308b2965b06b8 to your computer and use it in GitHub Desktop.
<?php
echo "<select>";
$hora = strtotime('00:00');
$i = 0;
$tempo = ceil($hora / (15*60)) * (15*60);
while($i < 96) {
echo '<option value="'. date('H:i', $tempo) .'">' . date('H:i', $tempo) . '</option>'."\n";
$tempo = strtotime('+15 minutes', $tempo);
$i++;
}
echo "<option value='23:59'>23:59</option>";
echo "</select>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment