= $start_ts) && ($ch_ts < $end_ts)); } // Create a date range between the schedule start and end dates $begin = new DateTime($schedule[0]['start']); $end = new DateTime(end($schedule)['start']); $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end); ?> format('Y-m-d') .' ' .date('H:i:s', $time + $i)); // We'll now use $merge to see if any shows are airing at this time $match = false; foreach ($schedule as $show) { if (check_in_range($show['start'], $show['end'], $merge->format('Y-m-d H:i:s'))) { echo "\n"; $match = true; break; } } // if no match was found, leave an empty node if (! $match) { echo "\n"; } } ?>
format("d") ?> format("l") ?> format("D") ?>
:00 " . $show['title'] . "