- print_r: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start = strtotime('00:00');
$end = strtotime('23:00');
$range = array();
while ($start !== $end)
{
$start = strtotime('+1 hour',$start);
$range[] = date('H:i', $start);
}
print_r($range);