Use the following array to print out a list of Canadian states, also know as provinces.
"BC" => "British Columbia", "ON" => "Ontario", "NL" => "Newfoundland and Labrador", "NS" => "Nova Scotia", "PE" => "Prince Edward Island", "NB" => "New Brunswick", "QC" => "Quebec", "MB" => "Manitoba", "SK" => "Saskatchewan", "AB" => "Alberta", "NT" => "Northwest Territories", "NU" => "Nunavut", "YT" => "Yukon Territory" );
Here is the same array, but with the French versions of the states.
"AB" => "Alberta", "BC" => "Colombie-Britannique", "MB" => "Manitoba", "NB" => "Nouveau-Brunswick", "NL" => "Terre-Neuve-et-Labrador", "NS" => "Nouvelle-Écosse", "NT" => "Territoires du Nord-Ouest", "NU" => "Nunavut", "ON" => "Ontario", "PE" => "Île-du-Prince-Édouard", "QC" => "Québec", "SK" => "Saskatchewan", "YT" => "Yukon" );
Use the following array if you want to print out a list of USA states either as a list, or as a select box.
'AK'=>"Alaska", 'AZ'=>"Arizona", 'AR'=>"Arkansas", 'CA'=>"California", 'CO'=>"Colorado", 'CT'=>"Connecticut", 'DE'=>"Delaware", 'DC'=>"District Of Columbia", 'FL'=>"Florida", 'GA'=>"Georgia", 'HI'=>"Hawaii", 'ID'=>"Idaho", 'IL'=>"Illinois", 'IN'=>"Indiana", 'IA'=>"Iowa", 'KS'=>"Kansas", 'KY'=>"Kentucky", 'LA'=>"Louisiana", 'ME'=>"Maine", 'MD'=>"Maryland", 'MA'=>"Massachusetts", 'MI'=>"Michigan", 'MN'=>"Minnesota", 'MS'=>"Mississippi", 'MO'=>"Missouri", 'MT'=>"Montana", 'NE'=>"Nebraska", 'NV'=>"Nevada", 'NH'=>"New Hampshire", 'NJ'=>"New Jersey", 'NM'=>"New Mexico", 'NY'=>"New York", 'NC'=>"North Carolina", 'ND'=>"North Dakota", 'OH'=>"Ohio", 'OK'=>"Oklahoma", 'OR'=>"Oregon", 'PA'=>"Pennsylvania", 'RI'=>"Rhode Island", 'SC'=>"South Carolina", 'SD'=>"South Dakota", 'TN'=>"Tennessee", 'TX'=>"Texas", 'UT'=>"Utah", 'VT'=>"Vermont", 'VA'=>"Virginia", 'WA'=>"Washington", 'WV'=>"West Virginia", 'WI'=>"Wisconsin", 'WY'=>"Wyoming");
If you want to reverse this then use the following code.
foreach ( $state_list as $key=>$state ) { $reverse[$state] = $key; } $state_list = $reverse;
PHP Array Of UK Counties
By philipnorton42 on 4th March 2009
Use the following code to create an array of counties in the UK.
$counties = array("Aberdeenshire"=>"Aberdeenshire","Angus/Forfarshire"=>"Angus/Forfarshire","Argyllshire"=>"Argyllshire", "Ayrshire"=>"Ayrshire","Banffshire"=>"Banffshire","Bedfordshire"=>"Bedfordshire","Berkshire"=>"Berkshire", "Berwickshire"=>"Berwickshire","Blaenau Gwent"=>"Blaenau Gwent","Bridgend"=>"Bridgend", "Buckinghamshire"=>"Buckinghamshire","Buteshire"=>"Buteshire","Caerphilly"=>"Caerphilly","Caithness"=>"Caithness", "Cambridgeshire"=>"Cambridgeshire","Cardiff"=>"Cardiff","Carmarthenshire"=>"Carmarthenshire", "Ceredigion"=>"Ceredigion","Cheshire"=>"Cheshire","Clackmannanshire"=>"Clackmannanshire", "Conwy"=>"Conwy","Cornwall"=>"Cornwall","Cromartyshire"=>"Cromartyshire","Cumberland"=>"Cumberland", "Denbighshire"=>"Denbighshire","Derbyshire"=>"Derbyshire","Devon"=>"Devon","Dorset"=>"Dorset", "Dumfriesshire"=>"Dumfriesshire","Dunbartonshire/Dumbartonshire"=>"Dunbartonshire/Dumbartonshire", "Durham"=>"Durham","East Lothian/Haddingtonshire"=>"East Lothian/Haddingtonshire","Essex"=>"Essex","Fife"=>"Fife", "Flintshire"=>"Flintshire","Gloucestershire"=>"Gloucestershire","Gwynedd"=>"Gwynedd","Hampshire"=>"Hampshire", "Herefordshire"=>"Herefordshire","Hertfordshire"=>"Hertfordshire","Huntingdonshire"=>"Huntingdonshire", "Inverness-shire"=>"Inverness-shire","Isle of Anglesey"=>"Isle of Anglesey","Kent"=>"Kent", "Kincardineshire"=>"Kincardineshire","Kinross-shire"=>"Kinross-shire","Kirkcudbrightshire"=>"Kirkcudbrightshire", "Lanarkshire"=>"Lanarkshire","Lancashire"=>"Lancashire","Leicestershire"=>"Leicestershire", "Lincolnshire"=>"Lincolnshire","Merthyr Tydfil"=>"Merthyr Tydfil","Middlesex"=>"Middlesex", "Midlothian/Edinburghshire"=>"Midlothian/Edinburghshire","Monmouthshire"=>"Monmouthshire", "Morayshire"=>"Morayshire","Nairnshire"=>"Nairnshire","Neath Port Talbot"=>"Neath Port Talbot", "Newport"=>"Newport","Norfolk"=>"Norfolk","Northamptonshire"=>"Northamptonshire", "Northumberland"=>"Northumberland","Nottinghamshire"=>"Nottinghamshire","Orkney"=>"Orkney", "Oxfordshire"=>"Oxfordshire","Peeblesshire"=>"Peeblesshire","Pembrokeshire"=>"Pembrokeshire", "Perthshire"=>"Perthshire","Powys"=>"Powys","Renfrewshire"=>"Renfrewshire", "Rhondda Cynon Taff"=>"Rhondda Cynon Taff","Ross-shire"=>"Ross-shire","Roxburghshire"=>"Roxburghshire", "Rutland"=>"Rutland","Selkirkshire"=>"Selkirkshire","Shetland"=>"Shetland","Shropshire"=>"Shropshire", "Somerset"=>"Somerset","Staffordshire"=>"Staffordshire","Stirlingshire"=>"Stirlingshire","Suffolk"=>"Suffolk", "Surrey"=>"Surrey","Sussex"=>"Sussex","Sutherland"=>"Sutherland","Swansea"=>"Swansea","Torfaen"=>"Torfaen","Tyne and Wear"=>"Tyne and Wear", "Vale of Glamorgan"=>"Vale of Glamorgan","Warwickshire"=>"Warwickshire", "West Lothian/Linlithgowshire"=>"West Lothian/Linlithgowshire","Westmorland"=>"Westmorland", "Wigtownshire"=>"Wigtownshire","Wiltshire"=>"Wiltshire", "Worcestershire"=>"Worcestershire","Wrexham"=>"Wrexham","Yorkshire"=>"Yorkshire");
This can be used to create a list of counties for a form.
Use the following array to print out a list of Australian states.
"NSW"=>"New South Wales", "VIC"=>"Victoria", "QLD"=>"Queensland", "TAS"=>"Tasmania", "SA"=>"South Australia", "WA"=>"Western Australia", "NT"=>"Northern Territory", "ACT"=>"Australian Capital Terrirory");
0 comments:
Post a Comment