Skip to content

julien-c/iso3166

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iso3166

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>