Odyssey
statecountry.i
1 <?php
2 /**
3  * @package Countries
4  * @link http://www.worldatlas.com/aatlas/ctycodes.htm
5  * 1) Copied list into text editor
6  * 2) Regex replace:
7  * From: ^\s*([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)\s*$
8  * To: array("text" => "\1", "two-digit" => "\2", "three-digit" => "\3", "number" => "\4", "dialing code" => "\5"),
9  *
10  * @package States
11  * @link http://www.infoplease.com/ipa/A0110468.html
12  * 1) Copied list into text editor
13  * 2) Regex replace:
14  * From: ^\s*([^\t]*)\t([^\t]*)\t([^\t]*)\s*$
15  * To: array("state" => "\1", "abbreviation" => "\2", "postal code" => "\3"),
16  */
17 
18 function getCountries()
19 {
20  return array(
21  array("text" => "Afghanistan", "two-digit" => "AF", "three-digit" => "AFG", "number" => "4", "dialing code" => "93"),
22  array("text" => "Albania", "two-digit" => "AL", "three-digit" => "ALB", "number" => "8", "dialing code" => "355"),
23  array("text" => "Algeria", "two-digit" => "DZ", "three-digit" => "DZA", "number" => "12", "dialing code" => "213"),
24  array("text" => "American Samoa", "two-digit" => "AS", "three-digit" => "ASM", "number" => "16", "dialing code" => "1-684"),
25  array("text" => "Andorra", "two-digit" => "AD", "three-digit" => "AND", "number" => "20", "dialing code" => "376"),
26  array("text" => "Angola", "two-digit" => "AO", "three-digit" => "AGO", "number" => "24", "dialing code" => "244"),
27  array("text" => "Anguilla", "two-digit" => "AI", "three-digit" => "AIA", "number" => "660", "dialing code" => "1-264"),
28  array("text" => "Antarctica", "two-digit" => "AQ", "three-digit" => "ATA", "number" => "10", "dialing code" => "672"),
29  array("text" => "Antigua and Barbuda", "two-digit" => "AG", "three-digit" => "ATG", "number" => "28", "dialing code" => "1-268"),
30  array("text" => "Argentina", "two-digit" => "AR", "three-digit" => "ARG", "number" => "32", "dialing code" => "54"),
31  array("text" => "Armenia", "two-digit" => "AM", "three-digit" => "ARM", "number" => "51", "dialing code" => "374"),
32  array("text" => "Aruba", "two-digit" => "AW", "three-digit" => "ABW", "number" => "533", "dialing code" => "297"),
33  array("text" => "Australia", "two-digit" => "AU", "three-digit" => "AUS", "number" => "36", "dialing code" => "61"),
34  array("text" => "Austria", "two-digit" => "AT", "three-digit" => "AUT", "number" => "40", "dialing code" => "43"),
35  array("text" => "Azerbaijan", "two-digit" => "AZ", "three-digit" => "AZE", "number" => "31", "dialing code" => "994"),
36  array("text" => "Bahamas", "two-digit" => "BS", "three-digit" => "BHS", "number" => "44", "dialing code" => "1-242"),
37  array("text" => "Bahrain", "two-digit" => "BH", "three-digit" => "BHR", "number" => "48", "dialing code" => "973"),
38  array("text" => "Bangladesh", "two-digit" => "BD", "three-digit" => "BGD", "number" => "50", "dialing code" => "880"),
39  array("text" => "Barbados", "two-digit" => "BB", "three-digit" => "BRB", "number" => "52", "dialing code" => "1-246"),
40  array("text" => "Belarus", "two-digit" => "BY", "three-digit" => "BLR", "number" => "112", "dialing code" => "375"),
41  array("text" => "Belgium", "two-digit" => "BE", "three-digit" => "BEL", "number" => "56", "dialing code" => "32"),
42  array("text" => "Belize", "two-digit" => "BZ", "three-digit" => "BLZ", "number" => "84", "dialing code" => "501"),
43  array("text" => "Benin", "two-digit" => "BJ", "three-digit" => "BEN", "number" => "204", "dialing code" => "229"),
44  array("text" => "Bermuda", "two-digit" => "BM", "three-digit" => "BMU", "number" => "60", "dialing code" => "1-441"),
45  array("text" => "Bhutan", "two-digit" => "BT", "three-digit" => "BTN", "number" => "64", "dialing code" => "975"),
46  array("text" => "Bolivia", "two-digit" => "BO", "three-digit" => "BOL", "number" => "68", "dialing code" => "591"),
47  array("text" => "Bonaire", "two-digit" => "BQ", "three-digit" => "BES", "number" => "535", "dialing code" => "599"),
48  array("text" => "Bosnia and Herzegovina", "two-digit" => "BA", "three-digit" => "BIH", "number" => "70", "dialing code" => "387"),
49  array("text" => "Botswana", "two-digit" => "BW", "three-digit" => "BWA", "number" => "72", "dialing code" => "267"),
50  array("text" => "Bouvet Island", "two-digit" => "BV", "three-digit" => "BVT", "number" => "74", "dialing code" => "47"),
51  array("text" => "Brazil", "two-digit" => "BR", "three-digit" => "BRA", "number" => "76", "dialing code" => "55"),
52  array("text" => "British Indian Ocean Territory", "two-digit" => "IO", "three-digit" => "IOT", "number" => "86", "dialing code" => "246"),
53  array("text" => "Brunei Darussalam", "two-digit" => "BN", "three-digit" => "BRN", "number" => "96", "dialing code" => "673"),
54  array("text" => "Bulgaria", "two-digit" => "BG", "three-digit" => "BGR", "number" => "100", "dialing code" => "359"),
55  array("text" => "Burkina Faso", "two-digit" => "BF", "three-digit" => "BFA", "number" => "854", "dialing code" => "226"),
56  array("text" => "Burundi", "two-digit" => "BI", "three-digit" => "BDI", "number" => "108", "dialing code" => "257"),
57  array("text" => "Cambodia", "two-digit" => "KH", "three-digit" => "KHM", "number" => "116", "dialing code" => "855"),
58  array("text" => "Cameroon", "two-digit" => "CM", "three-digit" => "CMR", "number" => "120", "dialing code" => "237"),
59  array("text" => "Canada", "two-digit" => "CA", "three-digit" => "CAN", "number" => "124", "dialing code" => "1"),
60  array("text" => "Cape Verde", "two-digit" => "CV", "three-digit" => "CPV", "number" => "132", "dialing code" => "238"),
61  array("text" => "Cayman Islands", "two-digit" => "KY", "three-digit" => "CYM", "number" => "136", "dialing code" => "1-345"),
62  array("text" => "Central African Republic", "two-digit" => "CF", "three-digit" => "CAF", "number" => "140", "dialing code" => "236"),
63  array("text" => "Chad", "two-digit" => "TD", "three-digit" => "TCD", "number" => "148", "dialing code" => "235"),
64  array("text" => "Chile", "two-digit" => "CL", "three-digit" => "CHL", "number" => "152", "dialing code" => "56"),
65  array("text" => "China", "two-digit" => "CN", "three-digit" => "CHN", "number" => "156", "dialing code" => "86"),
66  array("text" => "Christmas Island", "two-digit" => "CX", "three-digit" => "CXR", "number" => "162", "dialing code" => "61"),
67  array("text" => "Cocos (Keeling) Islands", "two-digit" => "CC", "three-digit" => "CCK", "number" => "166", "dialing code" => "61"),
68  array("text" => "Colombia", "two-digit" => "CO", "three-digit" => "COL", "number" => "170", "dialing code" => "57"),
69  array("text" => "Comoros", "two-digit" => "KM", "three-digit" => "COM", "number" => "174", "dialing code" => "269"),
70  array("text" => "Congo", "two-digit" => "CG", "three-digit" => "COG", "number" => "178", "dialing code" => "242"),
71  array("text" => "Democratic Republic of the Congo", "two-digit" => "CD", "three-digit" => "COD", "number" => "180", "dialing code" => "243"),
72  array("text" => "Cook Islands", "two-digit" => "CK", "three-digit" => "COK", "number" => "184", "dialing code" => "682"),
73  array("text" => "Costa Rica", "two-digit" => "CR", "three-digit" => "CRI", "number" => "188", "dialing code" => "506"),
74  array("text" => "Croatia", "two-digit" => "HR", "three-digit" => "HRV", "number" => "191", "dialing code" => "385"),
75  array("text" => "Cuba", "two-digit" => "CU", "three-digit" => "CUB", "number" => "192", "dialing code" => "53"),
76  array("text" => "Curaçao", "two-digit" => "CW", "three-digit" => "CUW", "number" => "531", "dialing code" => "599"),
77  array("text" => "Cyprus", "two-digit" => "CY", "three-digit" => "CYP", "number" => "196", "dialing code" => "357"),
78  array("text" => "Czech Republic", "two-digit" => "CZ", "three-digit" => "CZE", "number" => "203", "dialing code" => "420"),
79  array("text" => "Côte d'Ivoire", "two-digit" => "CI", "three-digit" => "CIV", "number" => "384", "dialing code" => "225"),
80  array("text" => "Denmark", "two-digit" => "DK", "three-digit" => "DNK", "number" => "208", "dialing code" => "45"),
81  array("text" => "Djibouti", "two-digit" => "DJ", "three-digit" => "DJI", "number" => "262", "dialing code" => "253"),
82  array("text" => "Dominica", "two-digit" => "DM", "three-digit" => "DMA", "number" => "212", "dialing code" => "1-767"),
83  array("text" => "Dominican Republic", "two-digit" => "DO", "three-digit" => "DOM", "number" => "214", "dialing code" => "1-809,1-829,1-849"),
84  array("text" => "Ecuador", "two-digit" => "EC", "three-digit" => "ECU", "number" => "218", "dialing code" => "593"),
85  array("text" => "Egypt", "two-digit" => "EG", "three-digit" => "EGY", "number" => "818", "dialing code" => "20"),
86  array("text" => "El Salvador", "two-digit" => "SV", "three-digit" => "SLV", "number" => "222", "dialing code" => "503"),
87  array("text" => "Equatorial Guinea", "two-digit" => "GQ", "three-digit" => "GNQ", "number" => "226", "dialing code" => "240"),
88  array("text" => "Eritrea", "two-digit" => "ER", "three-digit" => "ERI", "number" => "232", "dialing code" => "291"),
89  array("text" => "Estonia", "two-digit" => "EE", "three-digit" => "EST", "number" => "233", "dialing code" => "372"),
90  array("text" => "Ethiopia", "two-digit" => "ET", "three-digit" => "ETH", "number" => "231", "dialing code" => "251"),
91  array("text" => "Falkland Islands (Malvinas)", "two-digit" => "FK", "three-digit" => "FLK", "number" => "238", "dialing code" => "500"),
92  array("text" => "Faroe Islands", "two-digit" => "FO", "three-digit" => "FRO", "number" => "234", "dialing code" => "298"),
93  array("text" => "Fiji", "two-digit" => "FJ", "three-digit" => "FJI", "number" => "242", "dialing code" => "679"),
94  array("text" => "Finland", "two-digit" => "FI", "three-digit" => "FIN", "number" => "246", "dialing code" => "358"),
95  array("text" => "France", "two-digit" => "FR", "three-digit" => "FRA", "number" => "250", "dialing code" => "33"),
96  array("text" => "French Guiana", "two-digit" => "GF", "three-digit" => "GUF", "number" => "254", "dialing code" => "594"),
97  array("text" => "French Polynesia", "two-digit" => "PF", "three-digit" => "PYF", "number" => "258", "dialing code" => "689"),
98  array("text" => "French Southern Territories", "two-digit" => "TF", "three-digit" => "ATF", "number" => "260", "dialing code" => "262"),
99  array("text" => "Gabon", "two-digit" => "GA", "three-digit" => "GAB", "number" => "266", "dialing code" => "241"),
100  array("text" => "Gambia", "two-digit" => "GM", "three-digit" => "GMB", "number" => "270", "dialing code" => "220"),
101  array("text" => "Georgia", "two-digit" => "GE", "three-digit" => "GEO", "number" => "268", "dialing code" => "995"),
102  array("text" => "Germany", "two-digit" => "DE", "three-digit" => "DEU", "number" => "276", "dialing code" => "49"),
103  array("text" => "Ghana", "two-digit" => "GH", "three-digit" => "GHA", "number" => "288", "dialing code" => "233"),
104  array("text" => "Gibraltar", "two-digit" => "GI", "three-digit" => "GIB", "number" => "292", "dialing code" => "350"),
105  array("text" => "Greece", "two-digit" => "GR", "three-digit" => "GRC", "number" => "300", "dialing code" => "30"),
106  array("text" => "Greenland", "two-digit" => "GL", "three-digit" => "GRL", "number" => "304", "dialing code" => "299"),
107  array("text" => "Grenada", "two-digit" => "GD", "three-digit" => "GRD", "number" => "308", "dialing code" => "1-473"),
108  array("text" => "Guadeloupe", "two-digit" => "GP", "three-digit" => "GLP", "number" => "312", "dialing code" => "590"),
109  array("text" => "Guam", "two-digit" => "GU", "three-digit" => "GUM", "number" => "316", "dialing code" => "1-671"),
110  array("text" => "Guatemala", "two-digit" => "GT", "three-digit" => "GTM", "number" => "320", "dialing code" => "502"),
111  array("text" => "Guernsey", "two-digit" => "GG", "three-digit" => "GGY", "number" => "831", "dialing code" => "44"),
112  array("text" => "Guinea", "two-digit" => "GN", "three-digit" => "GIN", "number" => "324", "dialing code" => "224"),
113  array("text" => "Guinea-Bissau", "two-digit" => "GW", "three-digit" => "GNB", "number" => "624", "dialing code" => "245"),
114  array("text" => "Guyana", "two-digit" => "GY", "three-digit" => "GUY", "number" => "328", "dialing code" => "592"),
115  array("text" => "Haiti", "two-digit" => "HT", "three-digit" => "HTI", "number" => "332", "dialing code" => "509"),
116  array("text" => "Heard Island and McDonald Mcdonald Islands", "two-digit" => "HM", "three-digit" => "HMD", "number" => "334", "dialing code" => "672"),
117  array("text" => "Holy See (Vatican City State)", "two-digit" => "VA", "three-digit" => "VAT", "number" => "336", "dialing code" => "379"),
118  array("text" => "Honduras", "two-digit" => "HN", "three-digit" => "HND", "number" => "340", "dialing code" => "504"),
119  array("text" => "Hong Kong", "two-digit" => "HK", "three-digit" => "HKG", "number" => "344", "dialing code" => "852"),
120  array("text" => "Hungary", "two-digit" => "HU", "three-digit" => "HUN", "number" => "348", "dialing code" => "36"),
121  array("text" => "Iceland", "two-digit" => "IS", "three-digit" => "ISL", "number" => "352", "dialing code" => "354"),
122  array("text" => "India", "two-digit" => "IN", "three-digit" => "IND", "number" => "356", "dialing code" => "91"),
123  array("text" => "Indonesia", "two-digit" => "ID", "three-digit" => "IDN", "number" => "360", "dialing code" => "62"),
124  array("text" => "Iran, Islamic Republic of", "two-digit" => "IR", "three-digit" => "IRN", "number" => "364", "dialing code" => "98"),
125  array("text" => "Iraq", "two-digit" => "IQ", "three-digit" => "IRQ", "number" => "368", "dialing code" => "964"),
126  array("text" => "Ireland", "two-digit" => "IE", "three-digit" => "IRL", "number" => "372", "dialing code" => "353"),
127  array("text" => "Isle of Man", "two-digit" => "IM", "three-digit" => "IMN", "number" => "833", "dialing code" => "44"),
128  array("text" => "Israel", "two-digit" => "IL", "three-digit" => "ISR", "number" => "376", "dialing code" => "972"),
129  array("text" => "Italy", "two-digit" => "IT", "three-digit" => "ITA", "number" => "380", "dialing code" => "39"),
130  array("text" => "Jamaica", "two-digit" => "JM", "three-digit" => "JAM", "number" => "388", "dialing code" => "1-876"),
131  array("text" => "Japan", "two-digit" => "JP", "three-digit" => "JPN", "number" => "392", "dialing code" => "81"),
132  array("text" => "Jersey", "two-digit" => "JE", "three-digit" => "JEY", "number" => "832", "dialing code" => "44"),
133  array("text" => "Jordan", "two-digit" => "JO", "three-digit" => "JOR", "number" => "400", "dialing code" => "962"),
134  array("text" => "Kazakhstan", "two-digit" => "KZ", "three-digit" => "KAZ", "number" => "398", "dialing code" => "7"),
135  array("text" => "Kenya", "two-digit" => "KE", "three-digit" => "KEN", "number" => "404", "dialing code" => "254"),
136  array("text" => "Kiribati", "two-digit" => "KI", "three-digit" => "KIR", "number" => "296", "dialing code" => "686"),
137  array("text" => "Korea, Democratic People's Republic of", "two-digit" => "KP", "three-digit" => "PRK", "number" => "408", "dialing code" => "850"),
138  array("text" => "Korea, Republic of", "two-digit" => "KR", "three-digit" => "KOR", "number" => "410", "dialing code" => "82"),
139  array("text" => "Kuwait", "two-digit" => "KW", "three-digit" => "KWT", "number" => "414", "dialing code" => "965"),
140  array("text" => "Kyrgyzstan", "two-digit" => "KG", "three-digit" => "KGZ", "number" => "417", "dialing code" => "996"),
141  array("text" => "Lao People's Democratic Republic", "two-digit" => "LA", "three-digit" => "LAO", "number" => "418", "dialing code" => "856"),
142  array("text" => "Latvia", "two-digit" => "LV", "three-digit" => "LVA", "number" => "428", "dialing code" => "371"),
143  array("text" => "Lebanon", "two-digit" => "LB", "three-digit" => "LBN", "number" => "422", "dialing code" => "961"),
144  array("text" => "Lesotho", "two-digit" => "LS", "three-digit" => "LSO", "number" => "426", "dialing code" => "266"),
145  array("text" => "Liberia", "two-digit" => "LR", "three-digit" => "LBR", "number" => "430", "dialing code" => "231"),
146  array("text" => "Libya", "two-digit" => "LY", "three-digit" => "LBY", "number" => "434", "dialing code" => "218"),
147  array("text" => "Liechtenstein", "two-digit" => "LI", "three-digit" => "LIE", "number" => "438", "dialing code" => "423"),
148  array("text" => "Lithuania", "two-digit" => "LT", "three-digit" => "LTU", "number" => "440", "dialing code" => "370"),
149  array("text" => "Luxembourg", "two-digit" => "LU", "three-digit" => "LUX", "number" => "442", "dialing code" => "352"),
150  array("text" => "Macao", "two-digit" => "MO", "three-digit" => "MAC", "number" => "446", "dialing code" => "853"),
151  array("text" => "Macedonia, the Former Yugoslav Republic of", "two-digit" => "MK", "three-digit" => "MKD", "number" => "807", "dialing code" => "389"),
152  array("text" => "Madagascar", "two-digit" => "MG", "three-digit" => "MDG", "number" => "450", "dialing code" => "261"),
153  array("text" => "Malawi", "two-digit" => "MW", "three-digit" => "MWI", "number" => "454", "dialing code" => "265"),
154  array("text" => "Malaysia", "two-digit" => "MY", "three-digit" => "MYS", "number" => "458", "dialing code" => "60"),
155  array("text" => "Maldives", "two-digit" => "MV", "three-digit" => "MDV", "number" => "462", "dialing code" => "960"),
156  array("text" => "Mali", "two-digit" => "ML", "three-digit" => "MLI", "number" => "466", "dialing code" => "223"),
157  array("text" => "Malta", "two-digit" => "MT", "three-digit" => "MLT", "number" => "470", "dialing code" => "356"),
158  array("text" => "Marshall Islands", "two-digit" => "MH", "three-digit" => "MHL", "number" => "584", "dialing code" => "692"),
159  array("text" => "Martinique", "two-digit" => "MQ", "three-digit" => "MTQ", "number" => "474", "dialing code" => "596"),
160  array("text" => "Mauritania", "two-digit" => "MR", "three-digit" => "MRT", "number" => "478", "dialing code" => "222"),
161  array("text" => "Mauritius", "two-digit" => "MU", "three-digit" => "MUS", "number" => "480", "dialing code" => "230"),
162  array("text" => "Mayotte", "two-digit" => "YT", "three-digit" => "MYT", "number" => "175", "dialing code" => "262"),
163  array("text" => "Mexico", "two-digit" => "MX", "three-digit" => "MEX", "number" => "484", "dialing code" => "52"),
164  array("text" => "Micronesia, Federated States of", "two-digit" => "FM", "three-digit" => "FSM", "number" => "583", "dialing code" => "691"),
165  array("text" => "Moldova, Republic of", "two-digit" => "MD", "three-digit" => "MDA", "number" => "498", "dialing code" => "373"),
166  array("text" => "Monaco", "two-digit" => "MC", "three-digit" => "MCO", "number" => "492", "dialing code" => "377"),
167  array("text" => "Mongolia", "two-digit" => "MN", "three-digit" => "MNG", "number" => "496", "dialing code" => "976"),
168  array("text" => "Montenegro", "two-digit" => "ME", "three-digit" => "MNE", "number" => "499", "dialing code" => "382"),
169  array("text" => "Montserrat", "two-digit" => "MS", "three-digit" => "MSR", "number" => "500", "dialing code" => "1-664"),
170  array("text" => "Morocco", "two-digit" => "MA", "three-digit" => "MAR", "number" => "504", "dialing code" => "212"),
171  array("text" => "Mozambique", "two-digit" => "MZ", "three-digit" => "MOZ", "number" => "508", "dialing code" => "258"),
172  array("text" => "Myanmar", "two-digit" => "MM", "three-digit" => "MMR", "number" => "104", "dialing code" => "95"),
173  array("text" => "Namibia", "two-digit" => "NA", "three-digit" => "NAM", "number" => "516", "dialing code" => "264"),
174  array("text" => "Nauru", "two-digit" => "NR", "three-digit" => "NRU", "number" => "520", "dialing code" => "674"),
175  array("text" => "Nepal", "two-digit" => "NP", "three-digit" => "NPL", "number" => "524", "dialing code" => "977"),
176  array("text" => "Netherlands", "two-digit" => "NL", "three-digit" => "NLD", "number" => "528", "dialing code" => "31"),
177  array("text" => "New Caledonia", "two-digit" => "NC", "three-digit" => "NCL", "number" => "540", "dialing code" => "687"),
178  array("text" => "New Zealand", "two-digit" => "NZ", "three-digit" => "NZL", "number" => "554", "dialing code" => "64"),
179  array("text" => "Nicaragua", "two-digit" => "NI", "three-digit" => "NIC", "number" => "558", "dialing code" => "505"),
180  array("text" => "Niger", "two-digit" => "NE", "three-digit" => "NER", "number" => "562", "dialing code" => "227"),
181  array("text" => "Nigeria", "two-digit" => "NG", "three-digit" => "NGA", "number" => "566", "dialing code" => "234"),
182  array("text" => "Niue", "two-digit" => "NU", "three-digit" => "NIU", "number" => "570", "dialing code" => "683"),
183  array("text" => "Norfolk Island", "two-digit" => "NF", "three-digit" => "NFK", "number" => "574", "dialing code" => "672"),
184  array("text" => "Northern Mariana Islands", "two-digit" => "MP", "three-digit" => "MNP", "number" => "580", "dialing code" => "1-670"),
185  array("text" => "Norway", "two-digit" => "NO", "three-digit" => "NOR", "number" => "578", "dialing code" => "47"),
186  array("text" => "Oman", "two-digit" => "OM", "three-digit" => "OMN", "number" => "512", "dialing code" => "968"),
187  array("text" => "Pakistan", "two-digit" => "PK", "three-digit" => "PAK", "number" => "586", "dialing code" => "92"),
188  array("text" => "Palau", "two-digit" => "PW", "three-digit" => "PLW", "number" => "585", "dialing code" => "680"),
189  array("text" => "Palestine, State of", "two-digit" => "PS", "three-digit" => "PSE", "number" => "275", "dialing code" => "970"),
190  array("text" => "Panama", "two-digit" => "PA", "three-digit" => "PAN", "number" => "591", "dialing code" => "507"),
191  array("text" => "Papua New Guinea", "two-digit" => "PG", "three-digit" => "PNG", "number" => "598", "dialing code" => "675"),
192  array("text" => "Paraguay", "two-digit" => "PY", "three-digit" => "PRY", "number" => "600", "dialing code" => "595"),
193  array("text" => "Peru", "two-digit" => "PE", "three-digit" => "PER", "number" => "604", "dialing code" => "51"),
194  array("text" => "Philippines", "two-digit" => "PH", "three-digit" => "PHL", "number" => "608", "dialing code" => "63"),
195  array("text" => "Pitcairn", "two-digit" => "PN", "three-digit" => "PCN", "number" => "612", "dialing code" => "870"),
196  array("text" => "Poland", "two-digit" => "PL", "three-digit" => "POL", "number" => "616", "dialing code" => "48"),
197  array("text" => "Portugal", "two-digit" => "PT", "three-digit" => "PRT", "number" => "620", "dialing code" => "351"),
198  array("text" => "Puerto Rico", "two-digit" => "PR", "three-digit" => "PRI", "number" => "630", "dialing code" => "1"),
199  array("text" => "Qatar", "two-digit" => "QA", "three-digit" => "QAT", "number" => "634", "dialing code" => "974"),
200  array("text" => "Romania", "two-digit" => "RO", "three-digit" => "ROU", "number" => "642", "dialing code" => "40"),
201  array("text" => "Russian Federation", "two-digit" => "RU", "three-digit" => "RUS", "number" => "643", "dialing code" => "7"),
202  array("text" => "Rwanda", "two-digit" => "RW", "three-digit" => "RWA", "number" => "646", "dialing code" => "250"),
203  array("text" => "Reunion", "two-digit" => "RE", "three-digit" => "REU", "number" => "638", "dialing code" => "262"),
204  array("text" => "Saint Barthelemy", "two-digit" => "BL", "three-digit" => "BLM", "number" => "652", "dialing code" => "590"),
205  array("text" => "Saint Helena", "two-digit" => "SH", "three-digit" => "SHN", "number" => "654", "dialing code" => "290"),
206  array("text" => "Saint Kitts and Nevis", "two-digit" => "KN", "three-digit" => "KNA", "number" => "659", "dialing code" => "1-869"),
207  array("text" => "Saint Lucia", "two-digit" => "LC", "three-digit" => "LCA", "number" => "662", "dialing code" => "1-758"),
208  array("text" => "Saint Martin (French part)", "two-digit" => "MF", "three-digit" => "MAF", "number" => "663", "dialing code" => "590"),
209  array("text" => "Saint Pierre and Miquelon", "two-digit" => "PM", "three-digit" => "SPM", "number" => "666", "dialing code" => "508"),
210  array("text" => "Saint Vincent and the Grenadines", "two-digit" => "VC", "three-digit" => "VCT", "number" => "670", "dialing code" => "1-784"),
211  array("text" => "Samoa", "two-digit" => "WS", "three-digit" => "WSM", "number" => "882", "dialing code" => "685"),
212  array("text" => "San Marino", "two-digit" => "SM", "three-digit" => "SMR", "number" => "674", "dialing code" => "378"),
213  array("text" => "Sao Tome and Principe", "two-digit" => "ST", "three-digit" => "STP", "number" => "678", "dialing code" => "239"),
214  array("text" => "Saudi Arabia", "two-digit" => "SA", "three-digit" => "SAU", "number" => "682", "dialing code" => "966"),
215  array("text" => "Senegal", "two-digit" => "SN", "three-digit" => "SEN", "number" => "686", "dialing code" => "221"),
216  array("text" => "Serbia", "two-digit" => "RS", "three-digit" => "SRB", "number" => "688", "dialing code" => "381"),
217  array("text" => "Seychelles", "two-digit" => "SC", "three-digit" => "SYC", "number" => "690", "dialing code" => "248"),
218  array("text" => "Sierra Leone", "two-digit" => "SL", "three-digit" => "SLE", "number" => "694", "dialing code" => "232"),
219  array("text" => "Singapore", "two-digit" => "SG", "three-digit" => "SGP", "number" => "702", "dialing code" => "65"),
220  array("text" => "Sint Maarten (Dutch part)", "two-digit" => "SX", "three-digit" => "SXM", "number" => "534", "dialing code" => "1-721"),
221  array("text" => "Slovakia", "two-digit" => "SK", "three-digit" => "SVK", "number" => "703", "dialing code" => "421"),
222  array("text" => "Slovenia", "two-digit" => "SI", "three-digit" => "SVN", "number" => "705", "dialing code" => "386"),
223  array("text" => "Solomon Islands", "two-digit" => "SB", "three-digit" => "SLB", "number" => "90", "dialing code" => "677"),
224  array("text" => "Somalia", "two-digit" => "SO", "three-digit" => "SOM", "number" => "706", "dialing code" => "252"),
225  array("text" => "South Africa", "two-digit" => "ZA", "three-digit" => "ZAF", "number" => "710", "dialing code" => "27"),
226  array("text" => "South Georgia and the South Sandwich Islands", "two-digit" => "GS", "three-digit" => "SGS", "number" => "239", "dialing code" => "500"),
227  array("text" => "South Sudan", "two-digit" => "SS", "three-digit" => "SSD", "number" => "728", "dialing code" => "211"),
228  array("text" => "Spain", "two-digit" => "ES", "three-digit" => "ESP", "number" => "724", "dialing code" => "34"),
229  array("text" => "Sri Lanka", "two-digit" => "LK", "three-digit" => "LKA", "number" => "144", "dialing code" => "94"),
230  array("text" => "Sudan", "two-digit" => "SD", "three-digit" => "SDN", "number" => "729", "dialing code" => "249"),
231  array("text" => "Suriname", "two-digit" => "SR", "three-digit" => "SUR", "number" => "740", "dialing code" => "597"),
232  array("text" => "Svalbard and Jan Mayen", "two-digit" => "SJ", "three-digit" => "SJM", "number" => "744", "dialing code" => "47"),
233  array("text" => "Swaziland", "two-digit" => "SZ", "three-digit" => "SWZ", "number" => "748", "dialing code" => "268"),
234  array("text" => "Sweden", "two-digit" => "SE", "three-digit" => "SWE", "number" => "752", "dialing code" => "46"),
235  array("text" => "Switzerland", "two-digit" => "CH", "three-digit" => "CHE", "number" => "756", "dialing code" => "41"),
236  array("text" => "Syrian Arab Republic", "two-digit" => "SY", "three-digit" => "SYR", "number" => "760", "dialing code" => "963"),
237  array("text" => "Taiwan, Province of China", "two-digit" => "TW", "three-digit" => "TWN", "number" => "158", "dialing code" => "886"),
238  array("text" => "Tajikistan", "two-digit" => "TJ", "three-digit" => "TJK", "number" => "762", "dialing code" => "992"),
239  array("text" => "United Republic of Tanzania", "two-digit" => "TZ", "three-digit" => "TZA", "number" => "834", "dialing code" => "255"),
240  array("text" => "Thailand", "two-digit" => "TH", "three-digit" => "THA", "number" => "764", "dialing code" => "66"),
241  array("text" => "Timor-Leste", "two-digit" => "TL", "three-digit" => "TLS", "number" => "626", "dialing code" => "670"),
242  array("text" => "Togo", "two-digit" => "TG", "three-digit" => "TGO", "number" => "768", "dialing code" => "228"),
243  array("text" => "Tokelau", "two-digit" => "TK", "three-digit" => "TKL", "number" => "772", "dialing code" => "690"),
244  array("text" => "Tonga", "two-digit" => "TO", "three-digit" => "TON", "number" => "776", "dialing code" => "676"),
245  array("text" => "Trinidad and Tobago", "two-digit" => "TT", "three-digit" => "TTO", "number" => "780", "dialing code" => "1-868"),
246  array("text" => "Tunisia", "two-digit" => "TN", "three-digit" => "TUN", "number" => "788", "dialing code" => "216"),
247  array("text" => "Turkey", "two-digit" => "TR", "three-digit" => "TUR", "number" => "792", "dialing code" => "90"),
248  array("text" => "Turkmenistan", "two-digit" => "TM", "three-digit" => "TKM", "number" => "795", "dialing code" => "993"),
249  array("text" => "Turks and Caicos Islands", "two-digit" => "TC", "three-digit" => "TCA", "number" => "796", "dialing code" => "1-649"),
250  array("text" => "Tuvalu", "two-digit" => "TV", "three-digit" => "TUV", "number" => "798", "dialing code" => "688"),
251  array("text" => "Uganda", "two-digit" => "UG", "three-digit" => "UGA", "number" => "800", "dialing code" => "256"),
252  array("text" => "Ukraine", "two-digit" => "UA", "three-digit" => "UKR", "number" => "804", "dialing code" => "380"),
253  array("text" => "United Arab Emirates", "two-digit" => "AE", "three-digit" => "ARE", "number" => "784", "dialing code" => "971"),
254  array("text" => "United Kingdom", "two-digit" => "GB", "three-digit" => "GBR", "number" => "826", "dialing code" => "44"),
255  array("text" => "United States", "two-digit" => "US", "three-digit" => "USA", "number" => "840", "dialing code" => "1"),
256  array("text" => "United States Minor Outlying Islands", "two-digit" => "UM", "three-digit" => "UMI", "number" => "581", "dialing code" => "1"),
257  array("text" => "Uruguay", "two-digit" => "UY", "three-digit" => "URY", "number" => "858", "dialing code" => "598"),
258  array("text" => "Uzbekistan", "two-digit" => "UZ", "three-digit" => "UZB", "number" => "860", "dialing code" => "998"),
259  array("text" => "Vanuatu", "two-digit" => "VU", "three-digit" => "VUT", "number" => "548", "dialing code" => "678"),
260  array("text" => "Venezuela", "two-digit" => "VE", "three-digit" => "VEN", "number" => "862", "dialing code" => "58"),
261  array("text" => "Vietnam", "two-digit" => "VN", "three-digit" => "VNM", "number" => "704", "dialing code" => "84"),
262  array("text" => "British Virgin Islands", "two-digit" => "VG", "three-digit" => "VGB", "number" => "92", "dialing code" => "1-284"),
263  array("text" => "US Virgin Islands", "two-digit" => "VI", "three-digit" => "VIR", "number" => "850", "dialing code" => "1-340"),
264  array("text" => "Wallis and Futuna", "two-digit" => "WF", "three-digit" => "WLF", "number" => "876", "dialing code" => "681"),
265  array("text" => "Western Sahara", "two-digit" => "EH", "three-digit" => "ESH", "number" => "732", "dialing code" => "212"),
266  array("text" => "Yemen", "two-digit" => "YE", "three-digit" => "YEM", "number" => "887", "dialing code" => "967"),
267  array("text" => "Zambia", "two-digit" => "ZM", "three-digit" => "ZMB", "number" => "894", "dialing code" => "260"),
268  array("text" => "Zimbabwe", "two-digit" => "ZW", "three-digit" => "ZWE", "number" => "716", "dialing code" => "263"),
269  array("text" => "Aland Islands", "two-digit" => "AX", "three-digit" => "ALA", "number" => "248", "dialing code" => "358")
270  );
271 }
272 
273 function getStates()
274 {
275  return array(
276  array("state" => "Alabama", "abbreviation" => "Ala.", "postal code" => "AL"),
277  array("state" => "Alaska", "abbreviation" => "Alaska", "postal code" => "AK"),
278  array("state" => "American Samoa", "abbreviation" => " ", "postal code" => "AS"),
279  array("state" => "Arizona", "abbreviation" => "Ariz.", "postal code" => "AZ"),
280  array("state" => "Arkansas", "abbreviation" => "Ark.", "postal code" => "AR"),
281  array("state" => "California", "abbreviation" => "Calif.", "postal code" => "CA"),
282  array("state" => "Colorado", "abbreviation" => "Colo.", "postal code" => "CO"),
283  array("state" => "Connecticut", "abbreviation" => "Conn.", "postal code" => "CT"),
284  array("state" => "Delaware", "abbreviation" => "Del.", "postal code" => "DE"),
285  array("state" => "Dist. of Columbia", "abbreviation" => "D.C.", "postal code" => "DC"),
286  array("state" => "Florida", "abbreviation" => "Fla.", "postal code" => "FL"),
287  array("state" => "Georgia", "abbreviation" => "Ga.", "postal code" => "GA"),
288  array("state" => "Guam", "abbreviation" => "Guam", "postal code" => "GU"),
289  array("state" => "Hawaii", "abbreviation" => "Hawaii", "postal code" => "HI"),
290  array("state" => "Idaho", "abbreviation" => "Idaho", "postal code" => "ID"),
291  array("state" => "Illinois", "abbreviation" => "Ill.", "postal code" => "IL"),
292  array("state" => "Indiana", "abbreviation" => "Ind.", "postal code" => "IN"),
293  array("state" => "Iowa", "abbreviation" => "Iowa", "postal code" => "IA"),
294  array("state" => "Kansas", "abbreviation" => "Kans.", "postal code" => "KS"),
295  array("state" => "Kentucky", "abbreviation" => "Ky.", "postal code" => "KY"),
296  array("state" => "Louisiana", "abbreviation" => "La.", "postal code" => "LA"),
297  array("state" => "Maine", "abbreviation" => "Maine", "postal code" => "ME"),
298  array("state" => "Maryland", "abbreviation" => "Md.", "postal code" => "MD"),
299  array("state" => "Marshall Islands", "abbreviation" => " ", "postal code" => "MH"),
300  array("state" => "Massachusetts", "abbreviation" => "Mass.", "postal code" => "MA"),
301  array("state" => "Michigan", "abbreviation" => "Mich.", "postal code" => "MI"),
302  array("state" => "Micronesia", "abbreviation" => " ", "postal code" => "FM"),
303  array("state" => "Minnesota", "abbreviation" => "Minn.", "postal code" => "MN"),
304  array("state" => "Mississippi", "abbreviation" => "Miss.", "postal code" => "MS"),
305  array("state" => "Missouri", "abbreviation" => "Mo.", "postal code" => "MO"),
306  array("state" => "Montana", "abbreviation" => "Mont.", "postal code" => "MT"),
307  array("state" => "Nebraska", "abbreviation" => "Nebr.", "postal code" => "NE"),
308  array("state" => "Nevada", "abbreviation" => "Nev.", "postal code" => "NV"),
309  array("state" => "New Hampshire", "abbreviation" => "N.H.", "postal code" => "NH"),
310  array("state" => "New Jersey", "abbreviation" => "N.J.", "postal code" => "NJ"),
311  array("state" => "New Mexico", "abbreviation" => "N.M.", "postal code" => "NM"),
312  array("state" => "New York", "abbreviation" => "N.Y.", "postal code" => "NY"),
313  array("state" => "North Carolina", "abbreviation" => "N.C.", "postal code" => "NC"),
314  array("state" => "North Dakota", "abbreviation" => "N.D.", "postal code" => "ND"),
315  array("state" => "Northern Marianas", "abbreviation" => " ", "postal code" => "MP"),
316  array("state" => "Ohio", "abbreviation" => "Ohio", "postal code" => "OH"),
317  array("state" => "Oklahoma", "abbreviation" => "Okla.", "postal code" => "OK"),
318  array("state" => "Oregon", "abbreviation" => "Ore.", "postal code" => "OR"),
319  array("state" => "Palau", "abbreviation" => " ", "postal code" => "PW"),
320  array("state" => "Pennsylvania", "abbreviation" => "Pa.", "postal code" => "PA"),
321  array("state" => "Puerto Rico", "abbreviation" => "P.R.", "postal code" => "PR"),
322  array("state" => "Rhode Island", "abbreviation" => "R.I.", "postal code" => "RI"),
323  array("state" => "South Carolina", "abbreviation" => "S.C.", "postal code" => "SC"),
324  array("state" => "South Dakota", "abbreviation" => "S.D.", "postal code" => "SD"),
325  array("state" => "Tennessee", "abbreviation" => "Tenn.", "postal code" => "TN"),
326  array("state" => "Texas", "abbreviation" => "Tex.", "postal code" => "TX"),
327  array("state" => "Utah", "abbreviation" => "Utah", "postal code" => "UT"),
328  array("state" => "Vermont", "abbreviation" => "Vt.", "postal code" => "VT"),
329  array("state" => "Virginia", "abbreviation" => "Va.", "postal code" => "VA"),
330  array("state" => "Virgin Islands", "abbreviation" => "V.I.", "postal code" => "VI"),
331  array("state" => "Washington", "abbreviation" => "Wash.", "postal code" => "WA"),
332  array("state" => "West Virginia", "abbreviation" => "W.Va.", "postal code" => "WV"),
333  array("state" => "Wisconsin", "abbreviation" => "Wis.", "postal code" => "WI"),
334  array("state" => "Wyoming", "abbreviation" => "Wyo.", "postal code" => "WY")
335  );
336 }
337 
338 function getCountryDDL()
339 {
340  $countries= getCountries();
341  $ddl= array();
342  foreach($countries as $country)
343  {
344  $ddl[]= array("text" => $country["text"], "value" => $country["two-digit"]);
345  }
346  return $ddl;
347 }
348 
349 function getStateDDL()
350 {
351  $states= getStates();
352  $ddl= array();
353  foreach($states as $state)
354  {
355  $ddl[]= array("text" => $state["state"], "value" => $state["postal code"]);
356  }
357  return $ddl;
358 }