dev-master
9999999-devA PHP list of UK counties
MIT
The Development Requires
v1.0.1
1.0.1.0A PHP list of UK counties
MIT
The Development Requires
v1.0.0
1.0.0.0A PHP list of UK counties
MIT
The Development Requires
Wallogit.com
2017 © Pedro Peláez
A PHP list of UK counties
Produces a list of UK counties using PHP. Can be used to store county ID's rather than names., (*2)
Installation is available via Composer/Packagist, you can add the following line to your composer.json file:, (*3)
"adamb/uk-counties": "^1.0"
or, (*4)
composer require adamb/uk-counties
This software is distributed under the MIT license. Please read LICENSE for information on the software availability and distribution., (*5)
<?php 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
This can be used to store a unique county ID in a database rather than duplicating information., (*6)
<?php
use UKCounties\Counties;
echo(Counties::getCountyID('West Yorkshire')); // Returns 46
echo(Counties::getCountyID('Aberdeenshire')); // Returns 60
<?php use UKCounties\Counties; echo(Counties::getCountyName(46)); // Returns "West Yorkshire" echo(Counties::getCountyName(60)); // Returns "Aberdeenshire"
A PHP list of UK counties
MIT
A PHP list of UK counties
MIT
A PHP list of UK counties
MIT