' . $rowStop['stop_name'] . ' | ';
foreach ($trips as $trip) {
$found=False;
foreach ($trip['stops'] as $stop) {
if ($stop['stop_name'] == $rowStop['stop_name']) {
// check if bus runs on Friday only by checking another day, in this case Monday, (it doesn't matter which as the only variation is Friday only busses) and apply custom color to cells
if (($day == 'mon_fri') && ($trip['days_of_operation']['mon'] == False)) {
echo '' . $stop['departure_time'] . ' | ';
} else {
echo '' . $stop['departure_time'] . ' | ';
}
$found=True;
}
}
// print something to show bus doesn't use this stop on this trip e.g. during a route variation
if ($found != True) {
echo '---- | ';
}
}
echo '
';
}
echo '