Array met alle landen

Door Thijs Damen, 20 jaar geleden, 11.724x bekeken

Update 1 mei 2014
Een nieuwe lijst van de huidige landen is te vinden in "Lijst van alle landen (ISO 3166-1, April 2014)"


Een grote text file met daarin in 1 array met alle landen uit de wereld (ik zal er vast een paar missen). Iets waar je altijd naar op zoek bent en altijd weer een uur mee bezig ben om het goed te krijgen. Daarom nu voor iedereen.

**Alle informatie van de landen heb ik hier vandaan.

Gesponsorde koppelingen

PHP script bestanden

  1. array-met-alle-landen

 

Er zijn 25 reacties op 'Array met alle landen'

PHP hulp
PHP hulp
0 seconden vanaf nu
 

Gesponsorde koppelingen
Vincent
Vincent
20 jaar geleden
 
0 +1 -0 -1
yea, right..
dit is een script. ?
verder is t misschien wel handig hoor..
=)
Thijs Damen
Thijs Damen
20 jaar geleden
 
0 +1 -0 -1
vincent,

waar wou je het anders neer zetten?
onder tutorials? hoe maak ik een array ?
Ericbruggema x
ericbruggema x
20 jaar geleden
 
0 +1 -0 -1
Het zou handiger zijn als je ook de landcodes er bij zou hebben.

bv

"nl" => "Nederland"
"be" => "Belgie"

etc etc

De waarde van deze array heeft nu alleen maar nut voor registratie doeleinden waarbij je graag wilt weten waar de gebruiker vandaan komt ;)
Michael Voeten
Michael Voeten
20 jaar geleden
 
0 +1 -0 -1
of misschien het netnummer gebruiken ?
bv
31 => "Netherlands"
32 => "Belgium"
49 => "Germany"

of zoals hierboven de ISO land codes
Leon Kunst
Leon Kunst
20 jaar geleden
 
0 +1 -0 -1
Thuis heb ik dit ook in gebruik, alleen dan inderdaad met landcodes.

iemand daar belang bij?
Bo az
Bo az
20 jaar geleden
 
0 +1 -0 -1
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
<?php
$country
[] = array();
$country[0] = "Select Country";
?>


Hier maak je dus eerst voor de ongedefineerde variable $coutry, voor de index 0 een array aan en vervolgens overschrijf je dit door er een string in te zetten?

Ik denk dat je het volgende bedoelde:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
<?php
$country
= array();
$country[0] = "Select Country";
?>


Al zou ik persoonlijk het volgende aanraden, dan hoef je zelf niet meer naar de keys om te kijken:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
<?php
$country
= array();
$country[] = "Select Country";
$country[] = "Afghanistan";
$country[] = "Albania";
$country[] = "Algeria";
$country[] = "American Samoa";
?>
Thijs Damen
Thijs Damen
20 jaar geleden
 
0 +1 -0 -1
@eric, mikey, leon
Klopt. als een bus, daarom is ook aangegeven dat dit script voornamelijk bruikbaar is voor registratie doeleinden. ik heb persoonlijk nog geen behoefte gehad aan landen codes (zoals nl, of 31).

Het toevoegen hiervan is overigens geen grote klus, mocht iemand dat willen uploaden zal ik deze verwijderen.
Gerben Jacobs
Gerben Jacobs
20 jaar geleden
 
0 +1 -0 -1
Ik heb daar soms wel behoefte aan. De domein extensies NL, BE maar ook handig zouden de 3-letterige ISO codes zijn NLD, BEL etc.
Crispijn -
Crispijn -
20 jaar geleden
 
0 +1 -0 -1
Ja, ik ben wel nieuwsgierig naar die landcodes en ISO codes. Ik heb wel een database formaat met alle continenten erbij. PM me maar als je daar interesse in hebt.
Joren de Wit
Joren de Wit
20 jaar geleden
 
0 +1 -0 -1
Eh database? Bij bijna elk registratiescript zit wel een database, waarom dan niet gewoon alle landen daar ook in opslaan? Kun je direct bij een registratie je een land aan die gebruiker koppelen.

Scheelt je dus dubbel werk aangezien je de tabel met landen in ieder geval nodig hebt...
Ericbruggema x
ericbruggema x
20 jaar geleden
 
0 +1 -0 -1
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<?php
$landen
= array("ad"    => "Andorra",
                "ae"    => "United Arab Emirates",
                "af"    => "Afghanistan",
                "ag"    => "Antigua and Barbuda",
                "ai"    => "Anguilla",
                "al"    => "Albania",
                "am"    => "Armenia",
                "an"    => "Netherlands Antilles",
                "ao"    => "Angola",  
                "aq"    => "Antarctica",
                "ar"    => "Argentina",
                "as"    => "American Samoa",
                "at"    => "Austria",
                "au"    => "Australia",
                "aw"    => "Aruba",
                "ax"    => "Aland Islands",
                "az"    => "Azerbaijan",
                "ba"    => "Bosnia and Herzegovina",
                "bb"    => "Barbados",
                "bd"    => "Bangladesh",
                "be"    => "Belgium",
                "bf"    => "Burkina Faso",
                "bg"    => "Bulgaria",
                "bh"    => "Bahrain",
                "bi"    => "Burundi",
                "bj"    => "Benin",
                "bm"    => "Bermuda",
                "bn"    => "Brunei Darussalam",
                "bo"    => "Bolivia",
                "br"    => "Brazil",
                "bs"    => "Bahamas",
                "bt"    => "Bhutan",
                "bv"    => "Bouvet Island",
                "bw"    => "Botswana",
                "by"    => "Belarus",
                "bz"    => "Belize",
                "ca"    => "Canada",
                "cc"    => "Cocos (Keeling) Islands",
                "cd"    => "Democratic Republic of the Congo",
                "cf"    => "Central African Republic",
                "cg"    => "Congo",
                "ch"    => "Switzerland",
                "ci"    => "Cote D'Ivoire (Ivory Coast)",
                "ck"    => "Cook Islands",
                "cl"    => "Chile",
                "cm"    => "Cameroon",
                "cn"    => "China",
                "co"    => "Colombia",
                "cr"    => "Costa Rica",
                "cs"    => "Serbia and Montenegro",
                "cu"    => "Cuba",
                "cv"    => "Cape Verde",
                "cx"    => "Christmas Island",
                "cy"    => "Cyprus",
                "cz"    => "Czech Republic",
                "de"    => "Germany",
                "dj"    => "Djibouti",
                "dk"    => "Denmark",
                "dm"    => "Dominica",
                "do"    => "Dominican Republic",
                "dz"    => "Algeria",
                "ec"    => "Ecuador",
                "ee"    => "Estonia",
                "eg"    => "Egypt",
                "eh"    => "Western Sahara",
                "er"    => "Eritrea",
                "es"    => "Spain",
                "et"    => "Ethiopia",
                "fi"    => "Finland",
                "fj"    => "Fiji",
                "fk"    => "Falkland Islands (Malvinas)",
                "fm"    => "Federated States of Micronesia",
                "fo"    => "Faroe Islands",
                "fr"    => "France",
                "fx"    => "France. Metropolitan",
                "ga"    => "Gabon",
                "gb"    => "Great Britain (UK)",
                "gd"    => "Grenada",
                "ge"    => "Georgia",
                "gf"    => "French Guiana",
                "gh"    => "Ghana",
                "gi"    => "Gibraltar",
                "gl"    => "Greenland",
                "gm"    => "Gambia",
                "gn"    => "Guinea",
                "gp"    => "Guadeloupe",
                "gq"    => "Equatorial Guinea",
                "gr"    => "Greece",
                "gs"    => "S. Georgia and S. Sandwich Islands",
                "gt"    => "Guatemala",
                "gu"    => "Guam",
                "gw"    => "Guinea-Bissau",
                "gy"    => "Guyana",
                "hk"    => "Hong Kong",
                "hm"    => "Heard Island and McDonald Islands",
                "hn"    => "Honduras",
                "hr"    => "Croatia (Hrvatska)",
                "ht"    => "Haiti",
                "hu"    => "Hungary",
                "id"    => "Indonesia",
                "ie"    => "Ireland",
                "il"    => "Israel",
                "in"    => "India",
                "io"    => "British Indian Ocean Territory",
                "iq"    => "Iraq",
                "ir"    => "Iran",
                "is"    => "Iceland",
                "it"    => "Italy",
                "jm"    => "Jamaica",
                "jo"    => "Jordan",
                "jp"    => "Japan",
                "ke"    => "Kenya",
                "kg"    => "Kyrgyzstan",
                "kh"    => "Cambodia",
                "ki"    => "Kiribati",
                "km"    => "Comoros",
                "kn"    => "Saint Kitts and Nevis",
                "kp"    => "Korea (North)",
                "kr"    => "Korea (South)",
                "kw"    => "Kuwait",
                "ky"    => "Cayman Islands",
                "kz"    => "Kazakhstan",
                "la"    => "Laos",
                "lb"    => "Lebanon",
                "lc"    => "Saint Lucia",
                "li"    => "Liechtenstein",
                "lk"    => "Sri Lanka",
                "lr"    => "Liberia",
                "ls"    => "Lesotho",  
                "lt"    => "Lithuania",
                "lu"    => "Luxembourg",
                "lv"    => "Latvia",
                "ly"    => "Libya",
                "ma"    => "Morocco",
                "mc"    => "Monaco",
                "md"    => "Moldova",
                "mg"    => "Madagascar",
                "mh"    => "Marshall Islands",
                "mk"    => "Macedonia",
                "ml"    => "Mali",
                "mm"    => "Myanmar",
                "mn"    => "Mongolia",
                "mo"    => "Macao",
                "mp"    => "Northern Mariana Islands",
                "mq"    => "Martinique",
                "mr"    => "Mauritania",
                "ms"    => "Montserrat",
                "mt"    => "Malta",
                "mu"    => "Mauritius",
                "mv"    => "Maldives",
                "mw"    => "Malawi",
                "mx"    => "Mexico",
                "my"    => "Malaysia",
                "mz"    => "Mozambique",
                "na"    => "Namibia",
                "nc"    => "New Caledonia",
                "ne"    => "Niger",
                "nf"    => "Norfolk Island",
                "ng"    => "Nigeria",
                "ni"    => "Nicaragua",
                "nl"    => "Netherlands",
                "no"    => "Norway",
                "np"    => "Nepal",
                "nr"    => "Nauru",
                "nu"    => "Niue",
                "nz"    => "New Zealand (Aotearoa)",
                "om"    => "Oman",
                "pa"    => "Panama",
                "pe"    => "Peru",
                "pf"    => "French Polynesia",
                "pg"    => "Papua New Guinea",
                "ph"    => "Philippines",
                "pk"    => "Pakistan",
                "pl"    => "Poland",
                "pm"    => "Saint Pierre and Miquelon",
                "pn"    => "Pitcairn",
                "pr"    => "Puerto Rico",
                "ps"    => "Palestinian Territory",
                "pt"    => "Portugal",
                "pw"    => "Palau",
                "py"    => "Paraguay",
                "qa"    => "Qatar",
                "re"    => "Reunion",
                "ro"    => "Romania",
                "ru"    => "Russian Federation",
                "rw"    => "Rwanda",
                "sa"    => "Saudi Arabia",
                "sb"    => "Solomon Islands",
                "sc"    => "Seychelles",
                "sd"    => "Sudan",
                "se"    => "Sweden",
                "sg"    => "Singapore",
                "sh"    => "Saint Helena",
                "si"    => "Slovenia",
                "sj"    => "Svalbard and Jan Mayen",  
                "sk"    => "Slovakia",
                "sl"    => "Sierra Leone",
                "sm"    => "San Marino",
                "sn"    => "Senegal",
                "so"    => "Somalia",
                "sr"    => "Suriname",
                "st"    => "Sao Tome and Principe",
                "su"    => "USSR (former)",
                "sv"    => "El Salvador",
                "sy"    => "Syria",
                "sz"    => "Swaziland",
                "tc"    => "Turks and Caicos Islands",
                "td"    => "Chad",
                "tf"    => "French Southern Territories",
                "tg"    => "Togo",
                "th"    => "Thailand",
                "tj"    => "Tajikistan",
                "tk"    => "Tokelau",
                "tl"    => "Timor-Leste",
                "tm"    => "Turkmenistan",
                "tn"    => "Tunisia",
                "to"    => "Tonga",
                "tp"    => "East Timor",
                "tr"    => "Turkey",
                "tt"    => "Trinidad and Tobago",
                "tv"    => "Tuvalu",
                "tw"    => "Taiwan",
                "tz"    => "Tanzania",
                "ua"    => "Ukraine",
                "ug"    => "Uganda",
                "uk"    => "United Kingdom",
                "um"    => "United States Minor Outlying Islands",
                "us"    => "United States",
                "uy"    => "Uruguay",
                "uz"    => "Uzbekistan",
                "va"    => "Vatican City State (Holy See)",
                "vc"    => "Saint Vincent and the Grenadines",
                "ve"    => "Venezuela",
                "vg"    => "Virgin Islands (British)",
                "vi"    => "Virgin Islands (U.S.)",
                "vn"    => "Viet Nam",
                "vu"    => "Vanuatu",
                "wf"    => "Wallis and Futuna",
                "ws"    => "Samoa",
                "ye"    => "Yemen",
                "yt"    => "Mayotte",
                "yu"    => "Yugoslavia (former)",
                "za"    => "South Africa",
                "zm"    => "Zambia",
                "zr"    => "Zaire (former)",
                "zw"    => "Zimbabwe",
                "biz"   => "Business",
                "com"   => "Commercial",
                "edu"   => "US Educational",
                "gov"   => "US Government",
                "int"   => "International",
                "mil"   => "US Military",
                "net"   => "Network",
                "org"   => "Nonprofit Organization",
                "pro"   => "Professional Services",
                "aero"  => "Aeronautic",
                "arpa"  => "Arpanet Technical Infrastructure",
                "coop"  => "Cooperative",
                "info"  => "Info Domain",
                "name"  => "Personal Name",
                "nato"  => "North Atlantic Treaty Organization");

?>


Domeinen verschillen niet zo veel van de totaliteit aan landen ;) hopelijk kan iemand hier ook wat mee ;)
Arend a
Arend a
20 jaar geleden
 
0 +1 -0 -1
De officiele lijst met afkortingen en landennamen vind je hier (iso 3166):

http://en.wikipedia.org/wiki/ISO_3166
Thijs Damen
Thijs Damen
20 jaar geleden
 
0 +1 -0 -1
@eric,

je mist kosovo!
Ericbruggema x
ericbruggema x
20 jaar geleden
 
0 +1 -0 -1
Boeiend :P welke extensie heeft Kosovo dan? :P ko? so? vo?
Jens V
Jens V
20 jaar geleden
 
0 +1 -0 -1
Voor nog anderen geintresseerden, hier is een .rar file met allemaal vlagjes met de ISO landcodes:)
www.vandenreyt.be/flags.rar

(EDIT: het zijn er 172 plus 1 "nocountry.gif")

Mvg,
Jens
Lode
Lode
20 jaar geleden
 
0 +1 -0 -1
nog nooit gehoord van www.maxmind.com en soortgenoten?
Thijs Damen
Thijs Damen
20 jaar geleden
 
0 +1 -0 -1
Lode,
Nee, en ik zie daar ook geen relevantie toe tot dit script?

gokje: intelectuele eigendom,

informatie van de script is van een vrij gepubliceerde code snippet,
daarnaast is informatie over landen niet illegaal afaik?
Jens V
Jens V
20 jaar geleden
 
0 +1 -0 -1
Wat moet dat betekenen? :D
Ik snap echt de band van die maxmind met dit script niet...
Leon Kunst
Leon Kunst
20 jaar geleden
 
0 +1 -0 -1
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<? if (!isset($country)) { $country=" "; } ?>

<select name="country" class="tabellen" size="1">
<option value=" ">(Selecteer een land...)
<option value="AF"<? if ($country == "AF") {echo " selected";} ?>>Afghanistan
<option value="AL"<? if ($country == "AL") {echo " selected";} ?>>Albania
<option value="DZ"<? if ($country == "DZ") {echo " selected";} ?>>Algeria
<option value="AS"<? if ($country == "AS") {echo " selected";} ?>>American Samoa
<option value="AD"<? if ($country == "AD") {echo " selected";} ?>>Andorra
<option value="AO"<? if ($country == "AO") {echo " selected";} ?>>Angola
<option value="AI"<? if ($country == "AI") {echo " selected";} ?>>Anguilla
<option value="AQ"<? if ($country == "AQ") {echo " selected";} ?>>Antarctica
<option value="AG"<? if ($country == "AG") {echo " selected";} ?>>Antigua and Barbuda
<option value="AR"<? if ($country == "AR") {echo " selected";} ?>>Argentina
<option value="AM"<? if ($country == "AM") {echo " selected";} ?>>Armenia
<option value="AW"<? if ($country == "AW") {echo " selected";} ?>>Aruba
<option value="AU"<? if ($country == "AU") {echo " selected";} ?>>Australia
<option value="AT"<? if ($country == "AT") {echo " selected";} ?>>Austria
<option value="AZ"<? if ($country == "AZ") {echo " selected";} ?>>Azerbaijan
<option value="BS"<? if ($country == "BS") {echo " selected";} ?>>Bahamas
<option value="BH"<? if ($country == "BH") {echo " selected";} ?>>Bahrain
<option value="BD"<? if ($country == "BD") {echo " selected";} ?>>Bangladesh
<option value="BB"<? if ($country == "BB") {echo " selected";} ?>>Barbados
<option value="BY"<? if ($country == "BY") {echo " selected";} ?>>Belarus
<option value="BE"<? if ($country == "BE") {echo " selected";} ?>>Belgium
<option value="BZ"<? if ($country == "BZ") {echo " selected";} ?>>Baelize
<option value="BJ"<? if ($country == "BJ") {echo " selected";} ?>>Benin
<option value="BM"<? if ($country == "BM") {echo " selected";} ?>>Bermuda
<option value="BT"<? if ($country == "BT") {echo " selected";} ?>>Bhutan
<option value="BO"<? if ($country == "BO") {echo " selected";} ?>>Bolivia
<option value="BA"<? if ($country == "BA") {echo " selected";} ?>>Bosnia and Herzegowina
<option value="BW"<? if ($country == "BW") {echo " selected";} ?>>Botswana
<option value="BV"<? if ($country == "BV") {echo " selected";} ?>>Bouvet Island
<option value="BR"<? if ($country == "BR") {echo " selected";} ?>>Brazil
<option value="IO"<? if ($country == "IO") {echo " selected";} ?>>British Indian Ocean Territory
<option value="BN"<? if ($country == "BN") {echo " selected";} ?>>Brunei Darussalam
<option value="BG"<? if ($country == "BG") {echo " selected";} ?>>Bulgaria
<option value="BF"<? if ($country == "BF") {echo " selected";} ?>>Burkina Faso
<option value="BI"<? if ($country == "BI") {echo " selected";} ?>>Burundi
<option value="KH"<? if ($country == "KH") {echo " selected";} ?>>Cambodia
<option value="CM"<? if ($country == "CM") {echo " selected";} ?>>Cameroon
<option value="CA"<? if ($country == "CA") {echo " selected";} ?>>Canada
<option value="CV"<? if ($country == "CV") {echo " selected";} ?>>Cape Verde
<option value="KY"<? if ($country == "KY") {echo " selected";} ?>>Cayman Islands
<option value="CF"<? if ($country == "CF") {echo " selected";} ?>>Central African Republic
<option value="TD"<? if ($country == "TD") {echo " selected";} ?>>Chad
<option value="CL"<? if ($country == "CL") {echo " selected";} ?>>Chile
<option value="CN"<? if ($country == "CN") {echo " selected";} ?>>China
<option value="CX"<? if ($country == "CX") {echo " selected";} ?>>Christmas Island
<option value="CC"<? if ($country == "CC") {echo " selected";} ?>>Cocos (Keeling) Islands
<option value="CO"<? if ($country == "CO") {echo " selected";} ?>>Colombia
<option value="KM"<? if ($country == "KM") {echo " selected";} ?>>Comoros
<option value="CG"<? if ($country == "CG") {echo " selected";} ?>>Congo
<option value="CD"<? if ($country == "CD") {echo " selected";} ?>>Congo, the Democratic Republic of the
<option value="CK"<? if ($country == "CK") {echo " selected";} ?>>Cook Islands
<option value="CR"<? if ($country == "CR") {echo " selected";} ?>>Costa Rica
<option value="CI"<? if ($country == "CI") {echo " selected";} ?>>Cote d'Ivoire
<option value="HR"<? if ($country == "HR") {echo " selected";} ?>>Croatia (Hrvatska)
<option value="CU"<? if ($country == "CU") {echo " selected";} ?>>Cuba
<option value="CY"<? if ($country == "CY") {echo " selected";} ?>>Cyprus
<option value="CZ"<? if ($country == "CZ") {echo " selected";} ?>>Czech Republic
<option value="DK"<? if ($country == "DK") {echo " selected";} ?>>Denmark
<option value="DJ"<? if ($country == "DJ") {echo " selected";} ?>>Djibouti
<option value="DM"<? if ($country == "DM") {echo " selected";} ?>>Dominica
<option value="DO"<? if ($country == "DO") {echo " selected";} ?>>Dominican Republic
<option value="TP"<? if ($country == "TP") {echo " selected";} ?>>East Timor
<option value="EC"<? if ($country == "EC") {echo " selected";} ?>>Ecuador
<option value="EG"<? if ($country == "EG") {echo " selected";} ?>>Egypt
<option value="SV"<? if ($country == "SV") {echo " selected";} ?>>El Salvador
<option value="GQ"<? if ($country == "GQ") {echo " selected";} ?>>Equatorial Guinea
<option value="ER"<? if ($country == "ER") {echo " selected";} ?>>Eritrea
<option value="EE"<? if ($country == "EE") {echo " selected";} ?>>Estonia
<option value="ET"<? if ($country == "ET") {echo " selected";} ?>>Ethiopia
<option value="FK"<? if ($country == "FK") {echo " selected";} ?>>Falkland Islands (Malvinas)
<option value="FO"<? if ($country == "FO") {echo " selected";} ?>>Faroe Islands
<option value="FJ"<? if ($country == "FJ") {echo " selected";} ?>>Fiji
<option value="FI"<? if ($country == "FI") {echo " selected";} ?>>Finland
<option value="FR"<? if ($country == "FR") {echo " selected";} ?>>France
<option value="FX"<? if ($country == "FX") {echo " selected";} ?>>France, Metropolitan
<option value="GF"<? if ($country == "GF") {echo " selected";} ?>>French Guiana
<option value="PF"<? if ($country == "PF") {echo " selected";} ?>>French Polynesia
<option value="TF"<? if ($country == "TF") {echo " selected";} ?>>French Southern Territories
<option value="GA"<? if ($country == "GA") {echo " selected";} ?>>Gabon
<option value="GM"<? if ($country == "GM") {echo " selected";} ?>>Gambia
<option value="GE"<? if ($country == "GE") {echo " selected";} ?>>Georgia
<option value="DE"<? if ($country == "DE") {echo " selected";} ?>>Germany
<option value="GH"<? if ($country == "GH") {echo " selected";} ?>>Ghana
<option value="GI"<? if ($country == "GI") {echo " selected";} ?>>Gibraltar
<option value="GR"<? if ($country == "GR") {echo " selected";} ?>>Greece
<option value="GL"<? if ($country == "GL") {echo " selected";} ?>>Greenland
<option value="GD"<? if ($country == "GD") {echo " selected";} ?>>Grenada
<option value="GP"<? if ($country == "GP") {echo " selected";} ?>>Guadeloupe
<option value="GU"<? if ($country == "GU") {echo " selected";} ?>>Guam
<option value="GT"<? if ($country == "GT") {echo " selected";} ?>>Guatemala
<option value="GN"<? if ($country == "GN") {echo " selected";} ?>>Guinea
<option value="GW"<? if ($country == "GW") {echo " selected";} ?>>Guinea-Bissau
<option value="GY"<? if ($country == "GY") {echo " selected";} ?>>Guyana
<option value="HT"<? if ($country == "HT") {echo " selected";} ?>>Haiti
<option value="HM"<? if ($country == "HM") {echo " selected";} ?>>Heard and Mc Donald Islands
<option value="VA"<? if ($country == "VA") {echo " selected";} ?>>Holy See (Vatican City State)
<option value="HN"<? if ($country == "HN") {echo " selected";} ?>>Honduras
<option value="HK"<? if ($country == "HK") {echo " selected";} ?>>Hong Kong
<option value="HU"<? if ($country == "HU") {echo " selected";} ?>>Hungary
<option value="IS"<? if ($country == "IS") {echo " selected";} ?>>Iceland
<option value="IN"<? if ($country == "IN") {echo " selected";} ?>>India
<option value="ID"<? if ($country == "ID") {echo " selected";} ?>>Indonesia
<option value="IR"<? if ($country == "IR") {echo " selected";} ?>>Iran (Islamic Republic of)
<option value="IQ"<? if ($country == "IQ") {echo " selected";} ?>>Iraq
<option value="IE"<? if ($country == "IE") {echo " selected";} ?>>Ireland
<option value="IL"<? if ($country == "IL") {echo " selected";} ?>>Israel
<option value="IT"<? if ($country == "IT") {echo " selected";} ?>>Italy
<option value="JM"<? if ($country == "JM") {echo " selected";} ?>>Jamaica
<option value="JP"<? if ($country == "JP") {echo " selected";} ?>>Japan
<option value="JO"<? if ($country == "JO") {echo " selected";} ?>>Jordan
<option value="KZ"<? if ($country == "KZ") {echo " selected";} ?>>Kazakhstan
<option value="KE"<? if ($country == "KE") {echo " selected";} ?>>Kenya
<option value="KI"<? if ($country == "KI") {echo " selected";} ?>>Kiribati
<option value="KP"<? if ($country == "KP") {echo " selected";} ?>>Korea, Democratic People's Republic of
<option value="KR"<? if ($country == "KR") {echo " selected";} ?>>Korea, Republic of
<option value="KW"<? if ($country == "KW") {echo " selected";} ?>>Kuwait
<option value="KG"<? if ($country == "KG") {echo " selected";} ?>>Kyrgyzstan
<option value="LA"<? if ($country == "LA") {echo " selected";} ?>>Lao People's Democratic Republic
<option value="LV"<? if ($country == "LV") {echo " selected";} ?>>Latvia
<option value="LB"<? if ($country == "LB") {echo " selected";} ?>>Lebanon
<option value="LS"<? if ($country == "LS") {echo " selected";} ?>>Lesotho
<option value="LR"<? if ($country == "LR") {echo " selected";} ?>>Liberia
<option value="LY"<? if ($country == "LY") {echo " selected";} ?>>Libyan Arab Jamahiriya
<option value="LI"<? if ($country == "LI") {echo " selected";} ?>>Liechtenstein
<option value="LT"<? if ($country == "LT") {echo " selected";} ?>>Lithuania
<option value="LU"<? if ($country == "LU") {echo " selected";} ?>>Luxembourg
<option value="MO"<? if ($country == "MO") {echo " selected";} ?>>Macau
<option value="MK"<? if ($country == "MK") {echo " selected";} ?>>Macedonia, The Former Yugoslav Republic of
<option value="MG"<? if ($country == "MG") {echo " selected";} ?>>Madagascar
<option value="MW"<? if ($country == "MW") {echo " selected";} ?>>Malawi
<option value="MY"<? if ($country == "MY") {echo " selected";} ?>>Malaysia
<option value="MV"<? if ($country == "MV") {echo " selected";} ?>>Maldives
<option value="ML"<? if ($country == "ML") {echo " selected";} ?>>Mali
<option value="MT"<? if ($country == "MT") {echo " selected";} ?>>Malta
<option value="MH"<? if ($country == "MH") {echo " selected";} ?>>Marshall Islands
<option value="MQ"<? if ($country == "MQ") {echo " selected";} ?>>Martinique
<option value="MR"<? if ($country == "MR") {echo " selected";} ?>>Mauritania
<option value="MU"<? if ($country == "MU") {echo " selected";} ?>>Mauritius
<option value="YT"<? if ($country == "YT") {echo " selected";} ?>>Mayotte
<option value="MX"<? if ($country == "MX") {echo " selected";} ?>>Mexico
<option value="FM"<? if ($country == "FM") {echo " selected";} ?>>Micronesia, Federated States of
<option value="MD"<? if ($country == "MD") {echo " selected";} ?>>Moldova, Republic of
<option value="MC"<? if ($country == "MC") {echo " selected";} ?>>Monaco
<option value="MN"<? if ($country == "MN") {echo " selected";} ?>>Mongolia
<option value="MS"<? if ($country == "MS") {echo " selected";} ?>>Montserrat
<option value="MA"<? if ($country == "MA") {echo " selected";} ?>>Morocco
<option value="MZ"<? if ($country == "MZ") {echo " selected";} ?>>Mozambique
<option value="MM"<? if ($country == "MM") {echo " selected";} ?>>Myanmar
<option value="NA"<? if ($country == "NA") {echo " selected";} ?>>Namibia
<option value="NR"<? if ($country == "NR") {echo " selected";} ?>>Nauru
<option value="NP"<? if ($country == "NP") {echo " selected";} ?>>Nepal
<option value="NL" selected="selected"<? if ($country == "NL") {echo " selected";} ?>>Nederland
<option value="AN"<? if ($country == "AN") {echo " selected";} ?>>Netherlands Antilles
<option value="NC"<? if ($country == "NC") {echo " selected";} ?>>New Caledonia
<option value="NZ"<? if ($country == "NZ") {echo " selected";} ?>>New Zealand
<option value="NI"<? if ($country == "NI") {echo " selected";} ?>>Nicaragua
<option value="NE"<? if ($country == "NE") {echo " selected";} ?>>Niger
<option value="NG"<? if ($country == "NG") {echo " selected";} ?>>Nigeria
<option value="NU"<? if ($country == "NU") {echo " selected";} ?>>Niue
<option value="NF"<? if ($country == "NF") {echo " selected";} ?>>Norfolk Island
<option value="MP"<? if ($country == "MP") {echo " selected";} ?>>Northern Mariana Islands
<option value="NO"<? if ($country == "NO") {echo " selected";} ?>>Norway
<option value="OM"<? if ($country == "OM") {echo " selected";} ?>>Oman
<option value="PK"<? if ($country == "PK") {echo " selected";} ?>>Pakistan
<option value="PW"<? if ($country == "PW") {echo " selected";} ?>>Palau
<option value="PA"<? if ($country == "PA") {echo " selected";} ?>>Panama
<option value="PG"<? if ($country == "PG") {echo " selected";} ?>>Papua New Guinea
<option value="PY"<? if ($country == "PY") {echo " selected";} ?>>Paraguay
<option value="PE"<? if ($country == "PE") {echo " selected";} ?>>Peru
<option value="PH"<? if ($country == "PH") {echo " selected";} ?>>Philippines
<option value="PN"<? if ($country == "PN") {echo " selected";} ?>>Pitcairn
<option value="PL"<? if ($country == "PL") {echo " selected";} ?>>Poland
<option value="PT"<? if ($country == "PT") {echo " selected";} ?>>Portugal
<option value="PR"<? if ($country == "PR") {echo " selected";} ?>>Puerto Rico
<option value="QA"<? if ($country == "QA") {echo " selected";} ?>>Qatar
<option value="RE"<? if ($country == "RE") {echo " selected";} ?>>Reunion
<option value="RO"<? if ($country == "RO") {echo " selected";} ?>>Romania
<option value="RU"<? if ($country == "RU") {echo " selected";} ?>>Russian Federation
<option value="RW"<? if ($country == "RW") {echo " selected";} ?>>Rwanda
<option value="KN"<? if ($country == "KN") {echo " selected";} ?>>Saint Kitts and Nevis
<option value="LC"<? if ($country == "LC") {echo " selected";} ?>>Saint LUCIA
<option value="VC"<? if ($country == "VC") {echo " selected";} ?>>Saint Vincent and the Grenadines
<option value="WS"<? if ($country == "WS") {echo " selected";} ?>>Samoa
<option value="SM"<? if ($country == "SM") {echo " selected";} ?>>San Marino
<option value="ST"<? if ($country == "ST") {echo " selected";} ?>>Sao Tome and Principe
<option value="SA"<? if ($country == "SA") {echo " selected";} ?>>Saudi Arabia
<option value="SN"<? if ($country == "SN") {echo " selected";} ?>>Senegal
<option value="SC"<? if ($country == "SC") {echo " selected";} ?>>Seychelles
<option value="SL"<? if ($country == "SL") {echo " selected";} ?>>Sierra Leone
<option value="SG"<? if ($country == "SG") {echo " selected";} ?>>Singapore
<option value="SK"<? if ($country == "SK") {echo " selected";} ?>>Slovakia (Slovak Republic)
<option value="SI"<? if ($country == "SI") {echo " selected";} ?>>Slovenia
<option value="SB"<? if ($country == "SB") {echo " selected";} ?>>Solomon Islands
<option value="SO"<? if ($country == "SO") {echo " selected";} ?>>Somalia
<option value="ZA"<? if ($country == "ZA") {echo " selected";} ?>>South Africa
<option value="GS"<? if ($country == "GS") {echo " selected";} ?>>South Georgia and the South Sandwich Islands
<option value="ES"<? if ($country == "ES") {echo " selected";} ?>>Spain
<option value="LK"<? if ($country == "LK") {echo " selected";} ?>>Sri Lanka
<option value="SH"<? if ($country == "SH") {echo " selected";} ?>>St. Helena
<option value="PM"<? if ($country == "PM") {echo " selected";} ?>>St. Pierre and Miquelon
<option value="SD"<? if ($country == "SD") {echo " selected";} ?>>Sudan
<option value="SR"<? if ($country == "SR") {echo " selected";} ?>>Suriname
<option value="SJ"<? if ($country == "SJ") {echo " selected";} ?>>Svalbard and Jan Mayen Islands
<option value="SZ"<? if ($country == "SZ") {echo " selected";} ?>>Swaziland
<option value="SE"<? if ($country == "SE") {echo " selected";} ?>>Sweden
<option value="CH"<? if ($country == "CH") {echo " selected";} ?>>Switzerland
<option value="SY"<? if ($country == "SY") {echo " selected";} ?>>Syrian Arab Republic
<option value="TW"<? if ($country == "TW") {echo " selected";} ?>>Taiwan, Province of China
<option value="TJ"<? if ($country == "TJ") {echo " selected";} ?>>Tajikistan
<option value="TZ"<? if ($country == "TZ") {echo " selected";} ?>>Tanzania, United Republic of
<option value="TH"<? if ($country == "TH") {echo " selected";} ?>>Thailand
<option value="TG"<? if ($country == "TG") {echo " selected";} ?>>Togo
<option value="TK"<? if ($country == "TK") {echo " selected";} ?>>Tokelau
<option value="TO"<? if ($country == "TO") {echo " selected";} ?>>Tonga
<option value="TT"<? if ($country == "TT") {echo " selected";} ?>>Trinidad and Tobago
<option value="TN"<? if ($country == "TN") {echo " selected";} ?>>Tunisia
<option value="TR"<? if ($country == "TR") {echo " selected";} ?>>Turkey
<option value="TM"<? if ($country == "TM") {echo " selected";} ?>>Turkmenistan
<option value="TC"<? if ($country == "TC") {echo " selected";} ?>>Turks and Caicos Islands
<option value="TV"<? if ($country == "TV") {echo " selected";} ?>>Tuvalu
<option value="UG"<? if ($country == "UG") {echo " selected";} ?>>Uganda
<option value="UA"<? if ($country == "UA") {echo " selected";} ?>>Ukraine
<option value="AE"<? if ($country == "AE") {echo " selected";} ?>>United Arab Emirates
<option value="GB"<? if ($country == "GB") {echo " selected";} ?>>United Kingdom
<option value="US"<? if ($country == "US") {echo " selected";} ?>>United States
<option value="UM"<? if ($country == "UM") {echo " selected";} ?>>United States Minor Outlying Islands
<option value="UY"<? if ($country == "UY") {echo " selected";} ?>>Uruguay
<option value="UZ"<? if ($country == "UZ") {echo " selected";} ?>>Uzbekistan
<option value="VU"<? if ($country == "VU") {echo " selected";} ?>>Vanuatu
<option value="VE"<? if ($country == "VE") {echo " selected";} ?>>Venezuela
<option value="VN"<? if ($country == "VN") {echo " selected";} ?>>Viet Nam
<option value="VG"<? if ($country == "VG") {echo " selected";} ?>>Virgin Islands (British)
<option value="VI"<? if ($country == "VI") {echo " selected";} ?>>Virgin Islands (U.S.)
<option value="WF"<? if ($country == "WF") {echo " selected";} ?>>Wallis and Futuna Islands
<option value="EH"<? if ($country == "EH") {echo " selected";} ?>>Western Sahara
<option value="YE"<? if ($country == "YE") {echo " selected";} ?>>Yemen
<option value="YU"<? if ($country == "YU") {echo " selected";} ?>>Yugoslavia
<option value="ZM"<? if ($country == "ZM") {echo " selected";} ?>>Zambia
<option value="ZW"<? if ($country == "ZW") {echo " selected";} ?>>Zimbabwe
</select>


Suc6 ermee, voor vragen, PM me...
Tim
tim
20 jaar geleden
 
0 +1 -0 -1
bedankt voor die options Leon Kunst
Maar ik zou nederland niet selected=selected doen, maar if (!isset($country)) { $country=" "; } vervangen door: if (!isset($country)) { $country="NL"; }
anders krijg je allerlei bugs enzo:P

Neem ik mee voor mijn cms
Lode
Lode
20 jaar geleden
 
0 +1 -0 -1
ik heb maxmind in mijn database geknikkerd met 1.500.000 regels+
Dit is de complete geo database.

Waaronder ook een tabel landen met alle landen van de wereld.
index, 2-letter-code, volledig.

Hieruit kan je dus heel makkelijk een dergelijke lijst produceren.
En bijn 'n nieuwe versie hoef ik alleen m'n database maar te updaten waar nodig. Veel makkelijker als dit script dus wat mij betreft.
En er zijn gratis versies van www.maxmind.com en tutorials beschikbaar...
Jurgen assaasas
Jurgen assaasas
20 jaar geleden
 
0 +1 -0 -1
Kan dat niet korter, dmv een array en een while loopje, beetje overkil om elke keer if($country..... te doen.
Roemer Lievaart
Roemer Lievaart
13 jaar geleden
 
0 +1 -0 -1
Update april 2014, met de nieuwste landen (opgemaakt uit wikipedia/ISO):


Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?
// Nederlandse landenlijst, php/html, up-to-date tot April 2014, gebaseerd op ISO 3166-1

function toon_landen($geselecteerd_land) {
    $landen = <<<EOLANDEN
    <option value="AF">Afghanistan</option>
    <option value="AX">&Aring;land</option>
    <option value="AL">Albani&euml;</option>
    <option value="DZ">Algerije</option>
    <option value="VI">Amerikaanse Maagdeneilanden</option>
    <option value="AS">Amerikaans-Samoa</option>
    <option value="AD">Andorra</option>
    <option value="AO">Angola</option>
    <option value="AI">Anguilla</option>
    <option value="AQ">Antarctica</option>
    <option value="AG">Antigua en Barbuda</option>
    <option value="AR">Argentini&euml;</option>
    <option value="AM">Armeni&euml;</option>
    <option value="AW">Aruba</option>
    <option value="AU">Australi&euml;</option>
    <option value="AZ">Azerbeidzjan</option>
    <option value="BS">Bahama's</option>
    <option value="BH">Bahrein</option>
    <option value="BD">Bangladesh</option>
    <option value="BB">Barbados</option>
    <option value="BE">Belgi&euml;</option>
    <option value="BZ">Belize</option>
    <option value="BJ">Benin</option>
    <option value="BM">Bermuda</option>
    <option value="BT">Bhutan</option>
    <option value="BO">Bolivia</option>
    <option value="BQ">Bonaire, Sint Eustatius en Saba</option>
    <option value="BA">Bosni&euml; en Herzegovina</option>
    <option value="BW">Botswana</option>
    <option value="BV">Bouveteiland</option>
    <option value="BR">Brazili&euml;</option>
    <option value="VG">Britse Maagdeneilanden</option>
    <option value="IO">Brits Indische Oceaanterritorium</option>
    <option value="BN">Brunei</option>
    <option value="BG">Bulgarije</option>
    <option value="BF">Burkina Faso</option>
    <option value="BI">Burundi</option>
    <option value="KH">Cambodja</option>
    <option value="CA">Canada</option>
    <option value="CF">Centraal-Afrikaanse Republiek</option>
    <option value="CL">Chili</option>
    <option value="CN">China</option>
    <option value="CX">Christmaseiland</option>
    <option value="CC">Cocoseilanden</option>
    <option value="CO">Colombia</option>
    <option value="KM">Comoren</option>
    <option value="CG">Congo-Brazzaville</option>
    <option value="CD">Congo-Kinshasa</option>
    <option value="CK">Cookeilanden</option>
    <option value="CR">Costa Rica</option>
    <option value="CU">Cuba</option>
    <option value="CW">Cura&ccedil;ao</option>
    <option value="CY">Cyprus</option>
    <option value="DK">Denemarken</option>
    <option value="DJ">Djibouti</option>
    <option value="DM">Dominica</option>
    <option value="DO">Dominicaanse Republiek</option>
    <option value="DE">Duitsland</option>
    <option value="EC">Ecuador</option>
    <option value="EG">Egypte</option>
    <option value="SV">El Salvador</option>
    <option value="GQ">Equatoriaal-Guinea</option>
    <option value="ER">Eritrea</option>
    <option value="EE">Estland</option>
    <option value="ET">Ethiopi&euml;</option>
    <option value="FO">Faer&ouml;er</option>
    <option value="FK">Falklandeilanden</option>
    <option value="FJ">Fiji</option>
    <option value="PH">Filipijnen</option>
    <option value="FI">Finland</option>
    <option value="FR">Frankrijk</option>
    <option value="TF">Franse Zuidelijke en Antarctische Gebieden</option>
    <option value="GF">Frans-Guyana</option>
    <option value="PF">Frans-Polynesi&euml;</option>
    <option value="GA">Gabon</option>
    <option value="GM">Gambia</option>
    <option value="GE">Georgi&euml;</option>
    <option value="GH">Ghana</option>
    <option value="GI">Gibraltar</option>
    <option value="GD">Grenada</option>
    <option value="GR">Griekenland</option>
    <option value="GL">Groenland</option>
    <option value="GP">Guadeloupe</option>
    <option value="GU">Guam</option>
    <option value="GT">Guatemala</option>
    <option value="GG">Guernsey</option>
    <option value="GN">Guinee</option>
    <option value="GW">Guinee-Bissau</option>
    <option value="GY">Guyana</option>
    <option value="HT">Ha&iuml;ti</option>
    <option value="HM">Heard en McDonaldeilanden</option>
    <option value="HN">Honduras</option>
    <option value="HU">Hongarije</option>
    <option value="HK">Hongkong</option>
    <option value="IE">Ierland</option>
    <option value="IS">IJsland</option>
    <option value="IN">India</option>
    <option value="ID">Indonesi&euml;</option>
    <option value="IQ">Irak</option>
    <option value="IR">Iran</option>
    <option value="IL">Isra&euml;l</option>
    <option value="IT">Itali&euml;</option>
    <option value="CI">Ivoorkust</option>
    <option value="JM">Jamaica</option>
    <option value="JP">Japan</option>
    <option value="YE">Jemen</option>
    <option value="JE">Jersey</option>
    <option value="JO">Jordani&euml;</option>
    <option value="KY">Kaaimaneilanden</option>
    <option value="CV">Kaapverdi&euml;</option>
    <option value="CM">Kameroen</option>
    <option value="KZ">Kazachstan</option>
    <option value="KE">Kenia</option>
    <option value="KG">Kirgizi&euml;</option>
    <option value="KI">Kiribati</option>
    <option value="UM">Kleine Pacifische eilanden van de V.S.</option>
    <option value="KW">Koeweit</option>
    <option value="HR">Kroati&euml;</option>
    <option value="LA">Laos</option>
    <option value="LS">Lesotho</option>
    <option value="LV">Letland</option>
    <option value="LB">Libanon</option>
    <option value="LR">Liberia</option>
    <option value="LY">Libi&euml;</option>
    <option value="LI">Liechtenstein</option>
    <option value="LT">Litouwen</option>
    <option value="LU">Luxemburg</option>
    <option value="MO">Macau</option>
    <option value="MK">Macedoni&euml;</option>
    <option value="MG">Madagaskar</option>
    <option value="MW">Malawi</option>
    <option value="MV">Maldiven</option>
    <option value="MY">Maleisi&euml;</option>
    <option value="ML">Mali</option>
    <option value="MT">Malta</option>
    <option value="IM">Man</option>
    <option value="MA">Marokko</option>
    <option value="MH">Marshalleilanden</option>
    <option value="MQ">Martinique</option>
    <option value="MR">Mauritani&euml;</option>
    <option value="MU">Mauritius</option>
    <option value="YT">Mayotte</option>
    <option value="MX">Mexico</option>
    <option value="FM">Micronesia</option>
    <option value="MD">Moldavi&euml;</option>
    <option value="MC">Monaco</option>
    <option value="MN">Mongoli&euml;</option>
    <option value="ME">Montenegro</option>
    <option value="MS">Montserrat</option>
    <option value="MZ">Mozambique</option>
    <option value="MM">Myanmar</option>
    <option value="NA">Namibi&euml;</option>
    <option value="NR">Nauru</option>
    <option value="NL">Nederland</option>
    <option value="NP">Nepal</option>
    <option value="NI">Nicaragua</option>
    <option value="NC">Nieuw-Caledoni&euml;</option>
    <option value="NZ">Nieuw-Zeeland</option>
    <option value="NE">Niger</option>
    <option value="NG">Nigeria</option>
    <option value="NU">Niue</option>
    <option value="MP">Noordelijke Marianen</option>
    <option value="KP">Noord-Korea</option>
    <option value="NO">Noorwegen</option>
    <option value="NF">Norfolk</option>
    <option value="UG">Oeganda</option>
    <option value="UA">Oekra&iuml;ne</option>
    <option value="UZ">Oezbekistan</option>
    <option value="OM">Oman</option>
    <option value="AT">Oostenrijk</option>
    <option value="TL">Oost-Timor</option>
    <option value="PK">Pakistan</option>
    <option value="PW">Palau</option>
    <option value="PS">Palestina</option>
    <option value="PA">Panama</option>
    <option value="PG">Papoea-Nieuw-Guinea</option>
    <option value="PY">Paraguay</option>
    <option value="PE">Peru</option>
    <option value="PN">Pitcairneilanden</option>
    <option value="PL">Polen</option>
    <option value="PT">Portugal</option>
    <option value="PR">Puerto Rico</option>
    <option value="QA">Qatar</option>
    <option value="RE">R&eacute;union</option>
    <option value="RO">Roemeni&euml;</option>
    <option value="RU">Rusland</option>
    <option value="RW">Rwanda</option>
    <option value="BL">Saint-Barth&eacute;lemy</option>
    <option value="KN">Saint Kitts en Nevis</option>
    <option value="LC">Saint Lucia</option>
    <option value="PM">Saint-Pierre en Miquelon</option>
    <option value="VC">Saint Vincent en de Grenadines</option>
    <option value="SB">Salomonseilanden</option>
    <option value="WS">Samoa</option>
    <option value="SM">San Marino</option>
    <option value="SA">Saoedi-Arabi&euml;</option>
    <option value="ST">Sao Tom&eacute; en Principe</option>
    <option value="SN">Senegal</option>
    <option value="RS">Servi&euml;</option>
    <option value="SC">Seychellen</option>
    <option value="SL">Sierra Leone</option>
    <option value="SG">Singapore</option>
    <option value="SH">Sint-Helena, Ascension en Tristan da Cunha</option>
    <option value="MF">Sint-Maarten</option>
    <option value="SX">Sint Maarten</option>
    <option value="SI">Sloveni&euml;</option>
    <option value="SK">Slowakije</option>
    <option value="SD">Soedan</option>
    <option value="SO">Somali&euml;</option>
    <option value="ES">Spanje</option>
    <option value="SJ">Spitsbergen en Jan Mayen</option>
    <option value="LK">Sri Lanka</option>
    <option value="SR">Suriname</option>
    <option value="SZ">Swaziland</option>
    <option value="SY">Syri&euml;</option>
    <option value="TJ">Tadzjikistan</option>
    <option value="TW">Taiwan</option>
    <option value="TZ">Tanzania</option>
    <option value="TH">Thailand</option>
    <option value="TG">Togo</option>
    <option value="TK">Tokelau</option>
    <option value="TO">Tonga</option>
    <option value="TT">Trinidad en Tobago</option>
    <option value="TD">Tsjaad</option>
    <option value="CZ">Tsjechi&euml;</option>
    <option value="TN">Tunesi&euml;</option>
    <option value="TR">Turkije</option>
    <option value="TM">Turkmenistan</option>
    <option value="TC">Turks- en Caicoseilanden</option>
    <option value="TV">Tuvalu</option>
    <option value="UY">Uruguay</option>
    <option value="VU">Vanuatu</option>
    <option value="VA">Vaticaanstad</option>
    <option value="VE">Venezuela</option>
    <option value="AE">Verenigde Arabische Emiraten</option>
    <option value="US">Verenigde Staten</option>
    <option value="GB">Verenigd Koninkrijk</option>
    <option value="VN">Vietnam</option>
    <option value="WF">Wallis en Futuna</option>
    <option value="EH">Westelijke Sahara</option>
    <option value="BY">Wit-Rusland</option>
    <option value="ZM">Zambia</option>
    <option value="ZW">Zimbabwe</option>
    <option value="ZA">Zuid-Afrika</option>
    <option value="GS">Zuid-Georgia en de Zuidelijke Sandwicheilanden</option>
    <option value="KR">Zuid-Korea</option>
    <option value="SS">Zuid-Soedan</option>
    <option value="SE">Zweden</option>
    <option value="CH">Zwitserland</option>
EOLANDEN
;
    return str_replace("\"$geselecteerd_land\">", "\"$geselecteerd_land\" SELECTED>", $landen) ;
}
- Pepijn  -
- Pepijn -
13 jaar geleden
 
0 +1 -0 -1
Misschien een beetje een 7jarige bump?
PHP hulp
PHP hulp
0 seconden vanaf nu
 

Gesponsorde koppelingen
Henk Klapzak
henk Klapzak
11 jaar geleden
 
0 +1 -0 -1
Deze code is handig als je een formulier maakt, bovendien zijn de landen in het Nederlands en zijn ze allemaal omgezet in entiteiten
_________________________________________________________________

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
$country
= array();
$Country[0] = "Selecteer land";
$country[1] = "Afghanistan";
$country[2] = "Albani&euml;";
$country[3] = "Algerije";
$country[4] = "American Samoa";
$country[5] = "Andorra";
$country[6] = "Angola";
$country[7] = "Anguilla";
$country[8] = "Antarctica";
$country[9] = "Antigua en Barbuda";
$country[10] = "Argentini&euml;";
$country[11] = "Armenia";
$country[12] = "Aruba";
$country[13] = "Australia";
$country[14] = "Oostenrijk";
$country[15] = "Azerbaijan";
$country[16] = "De Bahamas";
$country[17] = "Bahrein";
$country[18] = "Bangladesh";
$country[19] = "Barbados";
$country[20] = "Wit-Rusland";
$country[21] = "Belgi&euml;";
$country[22] = "Belize";
$country[23] = "Benin";
$country[24] = "Bermuda";
$country[25] = "Bhutan";
$country[26] = "Bolivia";
$country[27] = "Bosni&euml; en Herzegovina";
$country[28] = "Botswana";
$country[29] = "Bouvet Island";
$country[30] = "Brazil";
$country[31] = "British Indian Ocean Territory";
$country[32] = "Brunei Darussalam";
$country[33] = "Bulgarije";
$country[34] = "Burkina Faso";
$country[35] = "Burundi";
$country[36] = "Cambodja";
$country[37] = "Kameroen";
$country[38] = "Canada";
$country[39] = "Cape Verde";
$country[40] = "Cayman Islands";
$country[41] = "Centraal-Afrikaanse Republiek";
$country[42] = "Chad";
$country[43] = "Chili";
$country[44] = "China";
$country[45] = "Christmas Island";
$country[46] = "Cocos (Keeling) Islands";
$country[47] = "Colombia";
$country[48] = "Comoren";
$country[49] = "Congo";
$country[50] = "Cook Islands";
$country[51] = "Costa Rica";
$country[52] = "Ivoorkust";
$country[53] = "Kroati&euml;";
$country[54] = "Cuba";
$country[55] = "Cyprus";
$country[56] = "Tsjechi&euml;";
$country[57] = "Denemarken";
$country[58] = "Djibouti";
$country[59] = "Dominica";
$country[60] = "Dominicaanse Republiek";
$country[61] = "Ecuador";
$country[62] = "Egypte";
$country[64] = "El Salvador";
$country[65] = "Equatoriaal-Guinea";
$country[66] = "eritrea";
$country[67] = "Estonia";
$country[68] = "Ethiopi&euml;";
$country[69] = "Falklandeilanden";
$country[70] = "Faer&ouml;er";
$country[71] = "Fiji";
$country[72] = "Finland";
$country[73] = "Frankrijk";
$country[74] = "Frans-Guyana";
$country[75] = "Frans-Polynesi&euml;";
$country[76] = "French Souther gebieden";
$country[77] = "Gabon";
$country[78] = "Gambia";
$country[79] = "Georgia";
$country[80] = "Germany";
$country[81] = "Ghana";
$country[82] = "Gibraltar";
$country[83] = "Griekenland";
$country[84] = "Groenland";
$country[85] = "Grenada";
$country[86] = "Guadeloupe";
$country[87] = "Guam";
$country[88] = "Guatemalia";
$country[89] = "Guinea";
$country[90] = "Guinea-Bissau";
$country[91] = "Guyana";
$country[92] = "Ha&iuml;ti";
$country[93] = "Honduras";
$country[94] = "Hong Kong";
$country[95] = "Hongarije";
$country[96] = "IJsland";
$country[97] = "India";
$country[98] = "Indonesia";
$country[99] = "Iran";
$country[100] = "Irak";
$country[101] = "Ierland";
$country[102] = "Isra&euml;l";
$country[103] = "Itali&euml;";
$country[104] = "Jamaica";
$country[105] = "Japan";
$country[106] = "Jordan";
$country[107] = "Kazakhstan";
$country[108] = "Kenia";
$country[109] = "Kiribati";
$country[110] = "Korea (Noord)";
$country[111] = "Korea (Zuid)";
$country[112] = "Kosovo";
$country[113] = "Koeweit";
$country[114] = "Kirgizi&euml;";
$country[115] = "Letland";
$country[116] = "Libanon";
$country[117] = "Lesotho";
$country[118] = "Liberia";
$country[119] = "Liechtenstein";
$country[120] = "Litouwen";
$country[121] = "Luxembourg";
$country[122] = "Macao";
$country[123] = "Macedoni&euml;";
$country[124] = "Madagascar";
$country[125] = "Malawi";
$country[126] = "Malysia";
$country[127] = "De Maldiven";
$country[128] = "Mali";
$country[129] = "Malta";
$country[130] = "Martinique";
$country[131] = "Mauritani&euml;";
$country[132] = "Mauritius";
$country[133] = "Mayotte";
$country[134] = "Mexico";
$country[135] = "Moldova";
$country[136] = "Monaco";
$country[137] = "Mongoli&euml;";
$country[138] = "Montserrat";
$country[139] = "Marokko";
$country[140] = "Mozambique";
$country[141] = "Myanmar";
$country[142] = "Namibi&euml;";
$country[143] = "Nauru";
$country[144] = "Nepal";
$country[145] = "Nederland";
$country[146] = "Nederlandse Antillen";
$country[147] = "Nieuw Zeeland";
$country[148] = "Nicaragua";
$country[149] = "Niger";
$country[150] = "Nigeria";
$country[151] = "Niue";
$country[152] = "Norfolk Island";
$country[153] = "Noorwegen";
$country[154] = "Oman";
$country[155] = "Pakistan";
$country[156] = "Palau";
$country[157] = "Panama";
$country[158] = "Paraguay";
$country[159] = "Peru";
$country[160] = "Philippines";
$country[161] = "Pitcairn";
$country[162] = "Polen";
$country[163] = "Portugal";
$country[164] = "Puerto Rico";
$country[165] = "Qatar";
$country[166] = "Reunion";
$country[167] = "Roemeni&euml;";
$country[168] = "Russische Federatie";
$country[169] = "Rwanda";
$country[170] = "Sint-Helena";
$country[171] = "Samoa";
$country[172] = "San Marino";
$country[173] = "Saoedi-Arabi&euml;";
$country[174] = "Senegal";
$country[175] = "Servi&euml; en Montenegro";
$country[176] = "Sierra Leone";
$country[177] = "Singapore";
$country[178] = "Slowakije";
$country[179] = "Sloveni&euml;";
$country[180] = "Zuid-Afrika";
$country[181] = "Spanje";
$country[182] = "Sri Lanka";
$country[183] = "Sudan";
$country[184] = "Suriname";
$country[185] = "Swaziland";
$country[186] = "Zweden";
$country[187] = "Zwitserland";
$country[188] = "Taiwan";
$country[189] = "Tajikistan";
$country[190] = "Tanzania";
$country[191] = "Thailand";
$country[192] = "Timor-Leste";
$country[193] = "Togo";
$country[194] = "Tonga";
$country[195] = "Trinidad en Tobago";
$country[196] = "Tunesi&euml;";
$country[197] = "Turkije";
$country[198] = "Turkmenistan";
$country[199] = "Tuvalu";
$country[200] = "Oeganda";
$country[201] = "Oekra&iuml;ne";
$country[202] = "Verenigd Koninkrijk";
$country[203] = "Verenigde Staten";
$country[204] = "Uruguay";
$country[205] = "Oezbekistan";
$country[206] = "Venezuela";
$country[207] = "Vietnam";
$country[208] = "Virgin Islands";
$country[209] = "Jemen";
$country[210] = "Zambia";
$country[211] = "Zimbabwe";
sort($country);

echo "<form method='post' action=''><select>";
$i = -1;
while ($i <= 210) {
$i++;

Echo "<option> $country[$i] </option>";
}

  
 Echo "</select></form>";
?>

Om te reageren heb je een account nodig en je moet ingelogd zijn.

Inhoudsopgave

  1. array-met-alle-landen

Labels

Navigatie

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.