function makeRoutes($cities, $visited = []) { if (!empty($cities)) { $return = array(); for ($i = count($cities) - 1; $i >= 0; $i--) { $newCities = $cities; $newVisited = $visited; list($city) = array_splice($newCities, $i, 1); array_unshift($newVisited, $city); $return = array_merge($return, makeRoutes($newCities, $newVisited)); } } else { $return = array($visited); } return $return; }
echo $routeLine[8]; ?> ">View Schedule</a> <!-- <div class="search-icon"></div> --> <input type="checkbox" name="route_checkboxes" id="<?php echo $routeLine[1]; ?> " value="<?php echo $routeLine[1]; ?> " checked="checked" style="display: none;"></div> <?php } } makeRoutes($routes); /* END making the route rows on the left of the page. */ ?> </div> <!-- <div id="landmarks_key" style='display: none;'> <form name="landmarks_layers"> <table border="0"> <tr> <td><input type="checkbox" id="bikeRack" value="0" onclick="toggle_landmark_layer(this.value,this.checked);" /></td> <td><img src="icons/SCT_BikeRack.png" width="36" height="36"/>Bike Rack Locations</td> </tr> <tr>