Exemple #1
0
 public function get_facility_json($district)
 {
     echo json_encode(Facilities::getFacilities_json($district));
 }
 public function createfacilitiessubcounty($sub_county, $type = NULL)
 {
     $facilities = Facilities::getFacilities_json($sub_county);
     $facility_listing = '';
     foreach ($facilities as $key => $value) {
         $facility_listing .= '<option value = "' . $value['facility_code'] . '">' . $value['facility_name'] . '</option>';
     }
     switch ($type) {
         case 'ajax':
             echo $facility_listing;
             break;
         default:
             return $facility_listing;
             break;
     }
 }