| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 313 | All time: 7,286 This week: 206 | ||||
| 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 | |||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| 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.