Hi there,
I want to dynamically create a list of times that will be used in an array to populate a drop down menu with times in half hour increments. It looks like this so far:
// Times drop down array
for($count = 1; $count <=8; $count++) {
$starttime1 = strtotime("08:00");
$interval = 30;
$times = array(date("H:i", strtotime('+'.($count*$interval).'minutes', $starttime1)));
}
When i do a 'print_r($times)' it prints:
Array ( [0] => 12:00 )
instead of
Array ( [0] => 08:00, [1] => 08:30, [3] => 09:00, [4] => 09:30...... )
What am i doing wrong