Skip to content

Instantly share code, notes, and snippets.

@jimkutter
Created November 16, 2011 16:21
  • Star 11 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jimkutter/1370525 to your computer and use it in GitHub Desktop.
List of US States in a PHP array
<?php
array(
'AL' => 'Alabama',
'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',
);
@joshuawieczorek
Copy link

Thanks for this array, it saved me a lot of work.

@ibrahim4145
Copy link

Thanks :)

@timberleys
Copy link

Its become very time saving.

@kublai
Copy link

kublai commented May 2, 2018

thank you!

@OwenHobbs
Copy link

Thanks!

@igor-imaginemage
Copy link

Thank you.

@tentacode
Copy link

Google always delivers 👍 thanks

@regiscamimura
Copy link

thanks!

@lmstephenson
Copy link

Thank you for this. I added the commonwealth and military too.

	// Commonwealth/Territory and Military
	'AS' => 'American Samoa',
	'DC' => 'District of Columbia',
	'FM' => 'Federated States of Micronesia',
	'GU' => 'Guam',
	'MH' => 'Marshall Islands',
	'MP' => 'Northern Mariana Islands',
	'PW' => 'Palau',
	'PR' => 'Puerto Rico',
	'VI' => 'Virgin Islands',
	'AE' => 'Armed Forces Africa',
	'AA' => 'Armed Forces Americas',
	'AE' => 'Armed Forces Canada',
	'AE' => 'Armed Forces Europe',
	'AE' => 'Armed Forces Middle East',
	'AP' => 'Armed Forces Pacific',

@mrwpress
Copy link

mrwpress commented Aug 2, 2023

Thank you!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment