I\'m looking for a solution to something which seems like it should be pretty simple, but it doesn\'t seem that I can find any good answers on here, and I can\'t seem to get it
Off of the top of my head. You can tweak as necessary.
$start = new DateTime('2013-08-14 09:00:00');
$end = new DateTime('2013-08-14 17:00:00');
$interval = new DateInterval('PT30M');
$period = new DatePeriod($start, $interval, $end);
foreach ($period as $dt)
{
// do something
echo $dt->format('H:iA');
}
Links