GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True"); $template["header"] = " "; $template["row"] = " "; $template["footer"] = "
ID Org. Dest. Plat. Sch Exp
{id} {org} {dest} {plat} {sch} {act}
"; if (isset($response->GetBoardResult->trainServices->service)) { print $template["header"]; foreach($response->GetBoardResult->trainServices->service as $service) { $row = $template["row"]; $destinations = array(); $row = str_replace("{id}",$service->trainid,$row); $row = str_replace("{org}",$service->origin->location->tiploc,$row); $row = str_replace("{dest}",$service->destination->location->tiploc,$row); $row = str_replace("{plat}",$service->platform,$row); $row = str_replace("{sch}",$servoce->std,$row); $row = str_replace("{act}",$service->etd,$row); print $row; } print $template["footer"]; } ?>