Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2019-10-11 (5 hours ago)  | | Not yet rated by the users | | Total: 280 | | All time: 7,446 This week: 357 |
|
Description | | Author |
This class can validate country code and get the respective name.
It can take a given country code with two letters and determine if it corresponds to a valid country.
The class can also get the name of a country given the respective two letter code. Innovation Award
 September 2018
Number 4 |
Many applications need to take the country code as parameter for their own purposes.
This class can take the two letter code of country and determine if it corresponds to a valid code. It can also return the respective country name.
Manuel Lemos |
| |
 |
|
Innovation award
 Nominee: 23x
Winner: 2x |
|
Details
CountryCode

Methods for working with 2-character country codes (validation, name from code).
??CAUTION
When using method getName()
, multibyte strings will be returned.
Usage Exaples
use peterkahl\CountryCode\CountryCode;
# Validate a country code string:
if (CountryCode::isValid('uk'))
{
echo 'valid';
}
else
{
echo 'invalid';
}
# Get name from country code:
echo CountryCode::getName('RE'); # Réunion
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.