User Guide & Reference Manual

States Model

Retrieve one or a list of states/provinces/countries in the Hero database.

Initialization


$this->load->model('states_model');

Method Reference

string GetStateByCode (string $state)

Retrieve a single state's data by it's 2-letter code.

string GetStateByName (string $state)

Retrieve a single state's data by it's full name.

array GetStates ()

Retrieve an array of all states/provinces, alphabetically sorted.

Each state in the array has the keys:

array GetCountries ()

Retrieve an array of all countries, alphabetically sorted.

Each country in the array has the keys: