PHP code example of rkr / countries
1. Go to this page and download the library: Download rkr/countries library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rkr / countries example snippets
$provider = new IcuCountryListProvider('en', 'GB');
print_r($provider->getCountries());
$provider = new IcuCountryNameLocator('en', 'GB');
echo $provider->getCountry('DE');
$provider = new EuCountryProvider('en', 'GB');
print_r($provider->getList());