Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum (1) | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 307 | All time: 7,318 This week: 423![]() |
Version | License | PHP version | Categories | |||
countrycode 1.0.4 | Custom (specified... | 5 | PHP 5, Geography, Validation |
Description | Author | |
This class can validate country code and get the respective name. Innovation Award
|
Methods for working with 2-character country codes (validation, name from code).
When using method getName()
, multibyte strings will be returned.
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
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.