JREAM
5/11/2012 - 7:38 PM

US States (JS/PHP)

US States (JS/PHP)


JavaScript US State Array:

var stateName = ['Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District Of Columbia','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusett','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','NorthCarolina','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virginia','Washington','West Virginia','Wisconsin','Wyoming'];

var statePrefix = ['AL','AK','AZ','AR','CA','CO','CT','DE','DC','FL','GA','HI','ID','IL','IN','IA','KS','KY','LA','ME','MD','MA','MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC','ND','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VT','VA','WA','WV','WI','WY'];

PHP US State Array:

$state = 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");