Exemplo n.º 1
0
 public function findairport()
 {
     $results = OperationsData::searchAirport($this->get->term);
     if (count($results) > 0) {
         $return = array();
         foreach ($results as $row) {
             $tmp = array('label' => "{$row->icao} ({$row->name})", 'value' => $row->icao, 'id' => $row->id);
             $return[] = $tmp;
         }
         echo json_encode($return);
     }
 }