PHPackages                             brightfishsoftware/isocountries - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. brightfishsoftware/isocountries

ActiveLibrary

brightfishsoftware/isocountries
===============================

IsoCountries - a simple class for managing ISO2 and ISO3 countries

03233PHP

Since Oct 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/BrightfishSoftware/IsoCountries)[ Packagist](https://packagist.org/packages/brightfishsoftware/isocountries)[ RSS](/packages/brightfishsoftware-isocountries/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

IsoCountries
============

[](#isocountries)

A simple class for returning ISO2 and ISO3 country codes and names. Great for populating HTML drop down country lists.

Features
--------

[](#features)

- Complete ISO2/ISO3 lists with mappings to the corresponding country names
- Get mappings for the EU, Europe, North America, South America, Africa, Asia &amp; Oceania
- Filter out countries you don't want
- Move preferred countries to the top of the returned list

Installation
------------

[](#installation)

Install Composer (assuming you haven't already got it):

```
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```

Add IsoCountries to your composer.json file via Packagist:

```
{
    "require": {
        "brightfishsoftware/isocountries": "dev-master"
    }
}
```

or link to the repository directly:

```
{
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/brightfishsoftware/isocountries"
        }
    ],
    "require": {
        "brightfishsoftware/isocountries": "dev-master"
    }
}
```

Run "composer install".

Examples
--------

[](#examples)

### Get All Countries

[](#get-all-countries)

```
