PHP code example of donsi / iso3166

1. Go to this page and download the library: Download donsi/iso3166 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/ */

    

donsi / iso3166 example snippets


// en, de, fr, ru, ar, ...
$languages = (new Donsi\ISO3166\ISO3166)->getLanguages();

 php
$ISO3166 = new Donsi\ISO3166\ISO3166;
$ISO3166->setLanguage('de');
$data = $ISO3166->alpha3('nld');
 php
$data = (new Donsi\ISO3166\ISO3166)->name($name);
$data = (new Donsi\ISO3166\ISO3166)->alpha2($alpha2);
$data = (new Donsi\ISO3166\ISO3166)->alpha3($alpha3);
$data = (new Donsi\ISO3166\ISO3166)->numeric($numeric);