--- a/stopList.php +++ b/stopList.php @@ -60,7 +60,7 @@ die(); } $stops = getNearbyStops($_SESSION['lat'], $_SESSION['lon'], 15); - echo ''; + echo '
'; $stopPositions[] = Array( $_SESSION['lat'], $_SESSION['lon'] @@ -73,7 +73,7 @@ } echo staticmap($stopPositions, true, true); placeSettings(); - echo ''; + echo '
'; } else if (isset($suburb)) { $stops = getStopsBySuburb($suburb); include_header("Stops in " . ucwords($suburb), "stopList"); @@ -81,7 +81,7 @@ trackEvent("Stop Lists", "Stops By Suburb", $suburb); } else { $listType = 'allstops=yes'; - $stops = getStops($firstLetter); + $stops = getStops((isset($firstLetter)? $firstLetter : "")); include_header("Stops by Name", "stopList"); navbar(); } @@ -94,9 +94,8 @@ //var_dump($stops); $stopsGrouped = Array(); foreach ($stops as $key => $stop) { - if (stopCompare($stops[$key]["stop_name"]) - != stopCompare($stops[$key + 1]["stop_name"]) - || $key + 1 >= sizeof($stops)) { + if ($key + 1 >= sizeof($stops) || + stopCompare($stops[$key]["stop_name"]) != stopCompare($stops[$key + 1]["stop_name"])) { if (sizeof($stopsGrouped) > 0) { // print and empty grouped stops // subsequent duplicates @@ -145,8 +144,9 @@ } } echo ''; - if (isset($nearby)) - echo ''; + if (isset($nearby)) { + echo '
'; +} } include_footer(); ?>