<?php
$startTime = new \DateTime('2014-05-21 09:00');
$endTime = new \DateTime('2014-05-22 16:00');
$timeStep = 15;
$timeArray = array();
while($startTime <= $endTime)
{
$timeArray[] = $startTime->format('Y-m-d H:i:s');
$startTime->add(new \DateInterval('PT'.$timeStep.'M'));
}
echo '<pre>' ; print_r($timeArray); echo '</pre>';
?>
-inte mitt påhitt, utan Oli's.