3v4l.org

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