1. Go to this page and download the library: Download adamb/uk-counties 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/ */
adamb / uk-counties example snippets
use UKCounties\Counties;
print_r(Counties::getCounties()); // Returns array of counties e.g. array(1 => 'Bedfordshire', 2 => 'Berkshire', 3 => 'Bristol', etc, etc, etc)
// To list the counties in alphabetical order you can use getCountiesByName() instead of getCounties()
print_r(Counties::getCountiesByName()); // Returns same as above but in alphabetical order