Search the blog

This may save you a bit of time if you need the UK counties as a PHP array or JavaScript object. Useful for checkout forms, etc.

JSON

{
	"Aberdeenshire": "Aberdeenshire",
	"Angus": "Angus",
	"Antrim": "Antrim",
	"Argyll": "Argyll",
	"Armagh": "Armagh",
	"Ayrshire": "Ayrshire",
	"Banffshire": "Banffshire",
	"Bedfordshire": "Bedfordshire",
	"Berkshire": "Berkshire",
	"Berwickshire": "Berwickshire",
	"Bristol": "Bristol",
	"Buckinghamshire": "Buckinghamshire",
	"Bute": "Bute",
	"Caithness": "Caithness",
	"Cambridgeshire": "Cambridgeshire",
	"Cheshire": "Cheshire",
	"City of London": "City of London",
	"Clackmannanshire": "Clackmannanshire",
	"Clwyd": "Clwyd",
	"Cornwall": "Cornwall",
	"Cumbria": "Cumbria",
	"Derbyshire": "Derbyshire",
	"Devon": "Devon",
	"Dorset": "Dorset",
	"Down": "Down",
	"Dumfriesshire": "Dumfriesshire",
	"Dunbartonshire": "Dunbartonshire",
	"Durham": "Durham",
	"Dyfed": "Dyfed",
	"East Lothian": "East Lothian",
	"East Riding of Yorkshire": "East Riding of Yorkshire",
	"East Sussex": "East Sussex",
	"Essex": "Essex",
	"Fermanagh": "Fermanagh",
	"Fife": "Fife",
	"Gloucestershire": "Gloucestershire",
	"Greater London": "Greater London",
	"Greater Manchester": "Greater Manchester",
	"Gwent": "Gwent",
	"Gwynedd": "Gwynedd",
	"Hampshire": "Hampshire",
	"Herefordshire": "Herefordshire",
	"Hertfordshire": "Hertfordshire",
	"Inverness-shire": "Inverness-shire",
	"Isle of Wight": "Isle of Wight",
	"Kent": "Kent",
	"Kincardineshire": "Kincardineshire",
	"Kinross-shire": "Kinross-shire",
	"Kirkcudbrightshire": "Kirkcudbrightshire",
	"Lanarkshire": "Lanarkshire",
	"Lancashire": "Lancashire",
	"Leicestershire": "Leicestershire",
	"Lincolnshire": "Lincolnshire",
	"Londonderry": "Londonderry",
	"Merseyside": "Merseyside",
	"Mid Glamorgan": "Mid Glamorgan",
	"Midlothian": "Midlothian",
	"Moray": "Moray",
	"Nairnshire": "Nairnshire",
	"Norfolk": "Norfolk",
	"North Yorkshire": "North Yorkshire",
	"Northamptonshire": "Northamptonshire",
	"Northumberland": "Northumberland",
	"Nottinghamshire": "Nottinghamshire",
	"Orkney": "Orkney",
	"Oxfordshire": "Oxfordshire",
	"Peeblesshire": "Peeblesshire",
	"Perthshire": "Perthshire",
	"Powys": "Powys",
	"Renfrewshire": "Renfrewshire",
	"Ross and Cromarty": "Ross and Cromarty",
	"Roxburghshire": "Roxburghshire",
	"Rutland": "Rutland",
	"Selkirkshire": "Selkirkshire",
	"Shetland": "Shetland",
	"Shropshire": "Shropshire",
	"Somerset": "Somerset",
	"South Glamorgan": "South Glamorgan",
	"South Yorkshire": "South Yorkshire",
	"Staffordshire": "Staffordshire",
	"Stirlingshire": "Stirlingshire",
	"Suffolk": "Suffolk",
	"Surrey": "Surrey",
	"Sutherland": "Sutherland",
	"Tyne and Wear": "Tyne and Wear",
	"Tyrone": "Tyrone",
	"Warwickshire": "Warwickshire",
	"West Glamorgan": "West Glamorgan",
	"West Lothian": "West Lothian",
	"West Midlands": "West Midlands",
	"West Sussex": "West Sussex",
	"West Yorkshire": "West Yorkshire",
	"Wigtownshire": "Wigtownshire",
	"Wiltshire": "Wiltshire",
	"Worcestershire": "Worcestershire"
}

PHP associative array

$counties = [

	'Aberdeenshire' => 'Aberdeenshire',
	'Angus' => 'Angus',
	'Antrim' => 'Antrim',
	'Argyll' => 'Argyll',
	'Armagh' => 'Armagh',
	'Ayrshire' => 'Ayrshire',
	'Banffshire' => 'Banffshire',
	'Bedfordshire' => 'Bedfordshire',
	'Berkshire' => 'Berkshire',
	'Berwickshire' => 'Berwickshire',
	'Bristol' => 'Bristol',
	'Buckinghamshire' => 'Buckinghamshire',
	'Bute' => 'Bute',
	'Caithness' => 'Caithness',
	'Cambridgeshire' => 'Cambridgeshire',
	'Cheshire' => 'Cheshire',
	'City of London' => 'City of London',
	'Clackmannanshire' => 'Clackmannanshire',
	'Clwyd' => 'Clwyd',
	'Cornwall' => 'Cornwall',
	'Cumbria' => 'Cumbria',
	'Derbyshire' => 'Derbyshire',
	'Devon' => 'Devon',
	'Dorset' => 'Dorset',
	'Down' => 'Down',
	'Dumfriesshire' => 'Dumfriesshire',
	'Dunbartonshire' => 'Dunbartonshire',
	'Durham' => 'Durham',
	'Dyfed' => 'Dyfed',
	'East Lothian' => 'East Lothian',
	'East Riding of Yorkshire' => 'East Riding of Yorkshire',
	'East Sussex' => 'East Sussex',
	'Essex' => 'Essex',
	'Fermanagh' => 'Fermanagh',
	'Fife' => 'Fife',
	'Gloucestershire' => 'Gloucestershire',
	'Greater London' => 'Greater London',
	'Greater Manchester' => 'Greater Manchester',
	'Gwent' => 'Gwent',
	'Gwynedd' => 'Gwynedd',
	'Hampshire' => 'Hampshire',
	'Herefordshire' => 'Herefordshire',
	'Hertfordshire' => 'Hertfordshire',
	'Inverness-shire' => 'Inverness-shire',
	'Isle of Wight' => 'Isle of Wight',
	'Kent' => 'Kent',
	'Kincardineshire' => 'Kincardineshire',
	'Kinross-shire' => 'Kinross-shire',
	'Kirkcudbrightshire' => 'Kirkcudbrightshire',
	'Lanarkshire' => 'Lanarkshire',
	'Lancashire' => 'Lancashire',
	'Leicestershire' => 'Leicestershire',
	'Lincolnshire' => 'Lincolnshire',
	'Londonderry' => 'Londonderry',
	'Merseyside' => 'Merseyside',
	'Mid Glamorgan' => 'Mid Glamorgan',
	'Midlothian' => 'Midlothian',
	'Moray' => 'Moray',
	'Nairnshire' => 'Nairnshire',
	'Norfolk' => 'Norfolk',
	'North Yorkshire' => 'North Yorkshire',
	'Northamptonshire' => 'Northamptonshire',
	'Northumberland' => 'Northumberland',
	'Nottinghamshire' => 'Nottinghamshire',
	'Orkney' => 'Orkney',
	'Oxfordshire' => 'Oxfordshire',
	'Peeblesshire' => 'Peeblesshire',
	'Perthshire' => 'Perthshire',
	'Powys' => 'Powys',
	'Renfrewshire' => 'Renfrewshire',
	'Ross and Cromarty' => 'Ross and Cromarty',
	'Roxburghshire' => 'Roxburghshire',
	'Rutland' => 'Rutland',
	'Selkirkshire' => 'Selkirkshire',
	'Shetland' => 'Shetland',
	'Shropshire' => 'Shropshire',
	'Somerset' => 'Somerset',
	'South Glamorgan' => 'South Glamorgan',
	'South Yorkshire' => 'South Yorkshire',
	'Staffordshire' => 'Staffordshire',
	'Stirlingshire' => 'Stirlingshire',
	'Suffolk' => 'Suffolk',
	'Surrey' => 'Surrey',
	'Sutherland' => 'Sutherland',
	'Tyne and Wear' => 'Tyne and Wear',
	'Tyrone' => 'Tyrone',
	'Warwickshire' => 'Warwickshire',
	'West Glamorgan' => 'West Glamorgan',
	'West Lothian' => 'West Lothian',
	'West Midlands' => 'West Midlands',
	'West Sussex' => 'West Sussex',
	'West Yorkshire' => 'West Yorkshire',
	'Wigtownshire' => 'Wigtownshire',
	'Wiltshire' => 'Wiltshire',
	'Worcestershire' => 'Worcestershire'
	
];

PHP array

$counties = [

    'Aberdeenshire',
    'Angus',
    'Antrim',
    'Argyll',
    'Armagh',
    'Ayrshire',
    'Banffshire',
    'Berkshire',
    'Berwickshire',
    'Bristol',
    'Buckinghamshire',
    'Bute',
    'Caithness',
    'Cambridgeshire',
    'Cheshire',
    'City of London',
    'Clackmannanshire',
    'Clwyd',
    'Cornwall',
    'Cumbria',
    'Derbyshire',
    'Devon',
    'Dorset',
    'Down',
    'Dumfriesshire',
    'Dunbartonshire',
    'Durham',
    'Dyfed',
    'East Lothian',
    'East Riding of Yorkshire',
    'East Sussex',
    'Essex',
    'Fermanagh',
    'Fife',
    'Gloucestershire',
    'Greater London',
    'Greater Manchester',
    'Gwent',
    'Gwynedd',
    'Hampshire',
    'Herefordshire',
    'Hertfordshire',
    'Inverness-shire',
    'Isle of Wight',
    'Kent',
    'Kincardineshire',
    'Kinross-shire',
    'Kirkcudbrightshire',
    'Lanarkshire',
    'Lancashire',
    'Leicestershire',
    'Lincolnshire',
    'Londonderry',
    'Merseyside',
    'Mid Glamorgan',
    'Midlothian',
    'Moray',
    'Nairnshire',
    'Norfolk',
    'North Yorkshire',
    'Northamptonshire',
    'Northumberland',
    'Nottinghamshire',
    'Orkney',
    'Oxfordshire',
    'Peeblesshire',
    'Perthshire',
    'Powys',
    'Renfrewshire',
    'Ross and Cromarty',
    'Roxburghshire',
    'Rutland',
    'Selkirkshire',
    'Shetland',
    'Shropshire',
    'Somerset',
    'South Glamorgan',
    'South Yorkshire',
    'Staffordshire',
    'Stirlingshire',
    'Suffolk',
    'Surrey',
    'Sutherland',
    'Tyne and Wear',
    'Tyrone',
    'Warwickshire',
    'West Glamorgan',
    'West Lothian',
    'West Midlands',
    'West Sussex',
    'West Yorkshire',
    'Wigtownshire',
    'Wiltshire',
    'Worcestershire'

];
Tim Bennett is a web designer and developer. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.