Posted By

eethann on 08/21/07


Tagged

forms validation statesus canadamexico


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

hudge
rezzz


US/CA/MX States as PHP Array


 / Published in: PHP
 

  1. $us_options = array(
  2. array('id' => 'USA-AL','value' => 'AL', 'label' => 'Alabama (AL)'),
  3. array('id' => 'USA-AK','value' => 'AK', 'label' => 'Alaska (AK)'),
  4. array('id' => 'USA-AZ','value' => 'AZ', 'label' => 'Arizona (AZ)'),
  5. array('id' => 'USA-AR','value' => 'AR', 'label' => 'Arkansas (AR)'),
  6. array('id' => 'USA-CA','value' => 'CA', 'label' => 'California (CA)'),
  7. array('id' => 'USA-CO','value' => 'CO', 'label' => 'Colorado (CO)'),
  8. array('id' => 'USA-CT','value' => 'CT', 'label' => 'Connecticut (CT)'),
  9. array('id' => 'USA-DE','value' => 'DE', 'label' => 'Delaware (DE)'),
  10. array('id' => 'USA-DC','value' => 'DC', 'label' => 'District of Columbia (DC)'),
  11. array('id' => 'USA-FL','value' => 'FL', 'label' => 'Florida (FL)'),
  12. array('id' => 'USA-GA','value' => 'GA', 'label' => 'Georgia (GA)'),
  13. array('id' => 'USA-GU','value' => 'GU', 'label' => 'Guam (GU)'),
  14. array('id' => 'USA-HI','value' => 'HI', 'label' => 'Hawaii (HI)'),
  15. array('id' => 'USA-ID','value' => 'ID', 'label' => 'Idaho (ID)'),
  16. array('id' => 'USA-IL','value' => 'IL', 'label' => 'Illinois (IL)'),
  17. array('id' => 'USA-IN','value' => 'IN', 'label' => 'Indiana (IN)'),
  18. array('id' => 'USA-IA','value' => 'IA', 'label' => 'Iowa (IA)'),
  19. array('id' => 'USA-KS','value' => 'KS', 'label' => 'Kansas (KS)'),
  20. array('id' => 'USA-KY','value' => 'KY', 'label' => 'Kentucky (KY)'),
  21. array('id' => 'USA-LA','value' => 'LA', 'label' => 'Louisiana (LA)'),
  22. array('id' => 'USA-ME','value' => 'ME', 'label' => 'Maine (ME)'),
  23. array('id' => 'USA-MD','value' => 'MD', 'label' => 'Maryland (MD)'),
  24. array('id' => 'USA-MA','value' => 'MA', 'label' => 'Massachusetts (MA)'),
  25. array('id' => 'USA-MI','value' => 'MI', 'label' => 'Michigan (MI)'),
  26. array('id' => 'USA-MN','value' => 'MN', 'label' => 'Minnesota (MN)'),
  27. array('id' => 'USA-MS','value' => 'MS', 'label' => 'Mississippi (MS)'),
  28. array('id' => 'USA-MO','value' => 'MO', 'label' => 'Missouri (MO)'),
  29. array('id' => 'USA-MT','value' => 'MT', 'label' => 'Montana (MT)'),
  30. array('id' => 'USA-NE','value' => 'NE', 'label' => 'Nebraska (NE)'),
  31. array('id' => 'USA-NV','value' => 'NV', 'label' => 'Nevada (NV)'),
  32. array('id' => 'USA-NH','value' => 'NH', 'label' => 'New Hampshire (NH)'),
  33. array('id' => 'USA-NJ','value' => 'NJ', 'label' => 'New Jersey (NJ)'),
  34. array('id' => 'USA-NM','value' => 'NM', 'label' => 'New Mexico (NM)'),
  35. array('id' => 'USA-NY','value' => 'NY', 'label' => 'New York (NY)'),
  36. array('id' => 'USA-NC','value' => 'NC', 'label' => 'North Carolina (NC)'),
  37. array('id' => 'USA-ND','value' => 'ND', 'label' => 'North Dakota (ND)'),
  38. array('id' => 'USA-OH','value' => 'OH', 'label' => 'Ohio (OH)'),
  39. array('id' => 'USA-OK','value' => 'OK', 'label' => 'Oklahoma (OK)'),
  40. array('id' => 'USA-OR','value' => 'OR', 'label' => 'Oregon (OR)'),
  41. array('id' => 'USA-PA','value' => 'PA', 'label' => 'Pennyslvania (PA)'),
  42. array('id' => 'USA-PR','value' => 'PR', 'label' => 'Puerto Rico (PR)'),
  43. array('id' => 'USA-RI','value' => 'RI', 'label' => 'Rhode Island (RI)'),
  44. array('id' => 'USA-SC','value' => 'SC', 'label' => 'South Carolina (SC)'),
  45. array('id' => 'USA-SD','value' => 'SD', 'label' => 'South Dakota (SD)'),
  46. array('id' => 'USA-TN','value' => 'TN', 'label' => 'Tennessee (TN)'),
  47. array('id' => 'USA-TX','value' => 'TX', 'label' => 'Texas (TX)'),
  48. array('id' => 'USA-UT','value' => 'UT', 'label' => 'Utah (UT)'),
  49. array('id' => 'USA-VT','value' => 'VT', 'label' => 'Vermont (VT)'),
  50. array('id' => 'USA-VA','value' => 'VA', 'label' => 'Virginia (VA)'),
  51. array('id' => 'USA-VI','value' => 'VI', 'label' => 'Virgin Islands (VI)'),
  52. array('id' => 'USA-WA','value' => 'WA', 'label' => 'Washington (WA)'),
  53. array('id' => 'USA-WV','value' => 'WV', 'label' => 'West Virginia (WV)'),
  54. array('id' => 'USA-WI','value' => 'WI', 'label' => 'Wisconsin (WI)'),
  55. array('id' => 'USA-WY','value' => 'WY', 'label' => 'Wyoming (WY)')
  56. );
  57.  
  58. $ca_options = array(
  59. array('id' => 'CAN-AB','value' => 'AB', 'label' => 'Alberta (AB)'),
  60. array('id' => 'CAN-BC','value' => 'BC', 'label' => 'British Columbia (BC)'),
  61. array('id' => 'CAN-MB','value' => 'MB', 'label' => 'Manitoba (MB)'),
  62. array('id' => 'CAN-NB','value' => 'NB', 'label' => 'New Brunswick (NB)'),
  63. array('id' => 'CAN-NL','value' => 'NL', 'label' => 'Newfoundland and Labrador (NL)'),
  64. array('id' => 'CAN-NT','value' => 'NT', 'label' => 'Northwest Territories (NT)'),
  65. array('id' => 'CAN-NS','value' => 'NS', 'label' => 'Nova Scotia (NS)'),
  66. array('id' => 'CAN-NU','value' => 'NU', 'label' => 'Nunavut (NU)'),
  67. array('id' => 'CAN-PE','value' => 'PE', 'label' => 'Prince Edward Island (PE)'),
  68. array('id' => 'CAN-SK','value' => 'SK', 'label' => 'Saskatchewan (SK)'),
  69. array('id' => 'CAN-ON','value' => 'ON', 'label' => 'Ontario (ON)'),
  70. array('id' => 'CAN-QC','value' => 'QC', 'label' => 'Quebec (QC)'),
  71. array('id' => 'CAN-YT','value' => 'YT', 'label' => 'Yukon (YT)')
  72. );
  73.  
  74. $mx_options = array(
  75. array('id' => 'MEX-AGS','value' => 'AGS', 'label' => 'Aguascalientes (AGS)'),
  76. array('id' => 'MEX-BCN','value' => 'BCN', 'label' => 'Baja California Norte (BCN)'),
  77. array('id' => 'MEX-BCS','value' => 'BCS', 'label' => 'Baja California Sur (BCS)'),
  78. array('id' => 'MEX-CAM','value' => 'CAM', 'label' => 'Campeche (CAM)'),
  79. array('id' => 'MEX-CHIS','value' => 'CHIS', 'label' => 'Chiapas (CHIS)'),
  80. array('id' => 'MEX-CHIH','value' => 'CHIH', 'label' => 'Chihuahua (CHIH)'),
  81. array('id' => 'MEX-COAH','value' => 'COAH', 'label' => 'Coahuila (COAH)'),
  82. array('id' => 'MEX-COL','value' => 'COL', 'label' => 'Colima (COL)'),
  83. array('id' => 'MEX-DF','value' => 'DF', 'label' => 'Distrito Federal (DF)'),
  84. array('id' => 'MEX-DGO','value' => 'DGO', 'label' => 'Durango (DGO)'),
  85. array('id' => 'MEX-GTO','value' => 'GTO', 'label' => 'Guanajuato (GTO)'),
  86. array('id' => 'MEX-GRO','value' => 'GRO', 'label' => 'Guerrero (GRO)'),
  87. array('id' => 'MEX-HGO','value' => 'HGO', 'label' => 'Hidalgo (HGO)'),
  88. array('id' => 'MEX-JAL','value' => 'JAL', 'label' => 'Jalisco (JAL)'),
  89. array('id' => 'MEX-EDM','value' => 'EDM', 'label' => 'México - Estado de (EDM)'),
  90. array('id' => 'MEX-MICH','value' => 'MICH', 'label' => 'Michoacán (MICH)'),
  91. array('id' => 'MEX-MOR','value' => 'MOR', 'label' => 'Morelos (MOR)'),
  92. array('id' => 'MEX-NAY','value' => 'NAY', 'label' => 'Nayarit (NAY)'),
  93. array('id' => 'MEX-NL','value' => 'NL', 'label' => 'Nuevo León (NL)'),
  94. array('id' => 'MEX-OAX','value' => 'OAX', 'label' => 'Oaxaca (OAX)'),
  95. array('id' => 'MEX-PUE','value' => 'PUE', 'label' => 'Puebla (PUE)'),
  96. array('id' => 'MEX-QRO','value' => 'QRO', 'label' => 'Querétaro (QRO)'),
  97. array('id' => 'MEX-QROO','value' => 'QROO', 'label' => 'Quintana Roo (QROO)'),
  98. array('id' => 'MEX-SLP','value' => 'SLP', 'label' => 'San Luis Potosí (SLP)'),
  99. array('id' => 'MEX-SIN','value' => 'SIN', 'label' => 'Sinaloa (SIN)'),
  100. array('id' => 'MEX-SON','value' => 'SON', 'label' => 'Sonora (SON)'),
  101. array('id' => 'MEX-TAB','value' => 'TAB', 'label' => 'Tabasco (TAB)'),
  102. array('id' => 'MEX-TAMPS','value' => 'TAMPS', 'label' => 'Tamaulipas (TAMPS)'),
  103. array('id' => 'MEX-TLAX','value' => 'TLAX', 'label' => 'Tlaxcala (TLAX)'),
  104. array('id' => 'MEX-VER','value' => 'VER', 'label' => 'Veracruz (VER)'),
  105. array('id' => 'MEX-YUC','value' => 'YUC', 'label' => 'Yucatán (YUC)'),
  106. array('id' => 'MEX-ZAC','value' => 'ZAC', 'label' => 'Zacatecas (ZAC)'),
  107. );

Report this snippet  

You need to login to post a comment.