--- a/routeList.php +++ b/routeList.php @@ -59,7 +59,8 @@ foreach ($routes as $route) { echo '<li><a href="trip.php?routeid=' . $route['route_id'] . '"><h3>' . $route['route_short_name'] . "</h3><p>" . $route['route_long_name'] . " (" . ucwords($route['service_id']) . ")</p>"; if ($_REQUEST['nearby']) { - echo '<span class="ui-li-count">' .floor($route['distance']) . 'm away</span>'; + $time = getTimeInterpolatedRouteAtStop($route['route_id'], $route['stop_id']); + echo '<span class="ui-li-count">'.($time['arrival_time']?$time['arrival_time']:"No more trips today")."<br>" .floor($route['distance']) . 'm away</span>'; } echo "</a></li>\n"; }