julien-c/iso3166

ISO 3166-1 alpha-2 mapping

2.0.1 2015-12-15 15:40 UTC

This package is not auto-updated.

Last update: 2024-11-01 22:24:09 UTC


README

ISO 3166-1 alpha-2 mapping:

Get Country Name:

echo Iso3166\Codes::country('FR');
// 'France'

Get Phone Code:

echo Iso3166\Codes::phoneCode('FR');
// '33'

Get Continent Name:

echo Iso3166\Codes::continent('EU');
// 'Europa'

Plus one super handy helper:

echo Iso3166\Codes::countrySelector('class', 'name', 'FR');

will output:

<select class="class" name="name">
  <option value="AF">Afghanistan</option>
  ...
  <option value="FR" selected>France</option>
  ...
</select>