1. Go to this page and download the library: Download datablock/countrycodes 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/ */
datablock / countrycodes example snippets
new CountryCodes([?string $country=null]);
use \Datablock\CountryCodes\CountryCodes;
// ...
$countrycodes = new CountryCodes();
$countrycodes = new CountryCodes('FR');
$countrycodes->setCountry(string $country);
use \Datablock\CountryCodes\CountryCodes;
// ...
$countrycodes = new CountryCodes();
// ...
$countrycodes->setCountry('FR');