I have no PC to test, but so it should roll:
<?php
$start = '08:12';
$end = '15:30';
$st = explode(':', $start);
$ed = explode(':', $end);
for($hour = $st[0]; $hour <= $ed[0]; $hour++)
{
for($min = $st[1]; $min < 60; $min += 15)
{
if($ed[1] >= $min and $hour <= $ed[0])
echo "Hour: {$hour}:{$min}<br/>";
}
}
I divide the hour into the two points, and in a split I go from the initial hour to the final. Logical if depending on the hours may not happen, for example if the interval is from 23 to 02, but as it was not mentioned in the question whether it can occur such case then I did not treat.
Do you only need the time? The date is not important ?
– gmsantos