(int) $r['StateID'], 'Abbr' => $r['StateAbbreviation'], 'Name' => $r['StateName'], ]; } jsonResponse(['OK' => true, 'STATES' => $states]); } catch (Exception $e) { jsonResponse(['OK' => false, 'ERROR' => 'server_error', 'MESSAGE' => $e->getMessage()]); }