We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

sherakama on 04/21/08


Tagged

select textmate array drupal state group province


Versions (?)


drupal province state select group array


Published in: PHP 


  1. $options = array('null'=>'Select One',
  2. 'other' => array('other'=>'Other'),
  3. 'Canadian Provinces' => array(
  4. 'AB' => 'Alberta',
  5. 'BC' => 'British Columbia',
  6. 'MB' => 'Manitoba',
  7. 'NB' => 'New Brunswick',
  8. 'NF' => 'Newfoundland',
  9. 'NT' => 'Northwest Territories',
  10. 'NS' => 'Nova Scotia',
  11. 'NU' => 'Nunavut',
  12. 'ON' => 'Ontario',
  13. 'PE' => 'Prince Edward Island',
  14. 'QC' => 'Quebec',
  15. 'SK' => 'Saskatchewan',
  16. 'YT' => 'Yukon Territory'),
  17. 'U.S. States' => array(
  18. 'AK' => 'Alaska',
  19. 'AL' => 'Alabama',
  20. 'AR' => 'Arkansas',
  21. 'AZ' => 'Arizona',
  22. 'CA' => 'California',
  23. 'CO' => 'Colorado',
  24. 'CT' => 'Connecticut',
  25. 'DC' => 'District of Columbia',
  26. 'DE' => 'Delaware',
  27. 'FL' => 'Florida',
  28. 'GA' => 'Georgia',
  29. 'HI' => 'Hawaii',
  30. 'IA' => 'Iowa',
  31. 'ID' => 'Idaho',
  32. 'IL' => 'Illinois',
  33. 'IN' => 'Indiana',
  34. 'KS' => 'Kansas',
  35. 'KY' => 'Kentucky',
  36. 'LA' => 'Louisiana',
  37. 'MA' => 'Massachusetts',
  38. 'MD' => 'Maryland',
  39. 'ME' => 'Maine',
  40. 'MI' => 'Michigan',
  41. 'MN' => 'Minnesota',
  42. 'MO' => 'Missouri',
  43. 'MS' => 'Mississippi',
  44. 'MT' => 'Montana',
  45. 'NC' => 'North Carolina',
  46. 'ND' => 'North Dakota',
  47. 'NE' => 'Nebraska',
  48. 'NH' => 'New Hampshire',
  49. 'NJ' => 'New Jersey',
  50. 'NM' => 'New Mexico',
  51. 'NV' => 'Nevada',
  52. 'NY' => 'New York',
  53. 'OH' => 'Ohio',
  54. 'OK' => 'Oklahoma',
  55. 'OR' => 'Oregon',
  56. 'PA' => 'Pennsylvania',
  57. 'PR' => 'Puerto Rico',
  58. 'RI' => 'Rhode Island',
  59. 'SC' => 'South Carolina',
  60. 'SD' => 'South Dakota',
  61. 'TN' => 'Tennessee',
  62. 'TX' => 'Texas',
  63. 'UT' => 'Utah',
  64. 'VA' => 'Virginia',
  65. 'VT' => 'Vermont',
  66. 'WA' => 'Washington',
  67. 'WI' => 'Wisconsin',
  68. 'WV' => 'West Virginia',
  69. 'WY' => 'Wyoming'),
  70. );

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: berkes on April 23, 2008

warning: this code does not run trough t(), hence it is not translatable!

Posted By: sherakama on May 27, 2008

You are very right. This is for an english speaking form only. You may add the t() function to the values if you wish.

You need to login to post a comment.