Skip to content

Instantly share code, notes, and snippets.

@idhamperdameian
Created October 10, 2014 03:53
Show Gist options
  • Save idhamperdameian/699a970c7899cd0f2479 to your computer and use it in GitHub Desktop.
Save idhamperdameian/699a970c7899cd0f2479 to your computer and use it in GitHub Desktop.
Loop for time incremented by 15 minutes
<?php
$start=strtotime('00:00');
$end=strtotime('23:30');
for ($i=$start;$i<=$end;$i = $i + 15*60)
{
echo date('H:i A',$i).'<br>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment