@ 2019-10-03T09:16:08Z <?php
$country_codes = array('UK','IRL');
$country_list = array(
'ALB' => 'Albania',
'AND' => 'Andorra',
'ARM' => 'Armenia',
'AUT' => 'Austria',
'AZE' => 'Azerbaijan',
'BLR' => 'Belarus',
'BEL' => 'Belgium',
'BIH' => 'Bosnia and Herzegovina',
'BGR' => 'Bulgaria',
'HRV' => 'Croatia',
'CYP' => 'Cyprus',
'CZE' => 'Czech Republic',
'DNK' => 'Denmark',
'EST' => 'Estonia',
'FIN' => 'Finland',
'FRA' => 'France',
'GEO' => 'Georgia',
'DEU' => 'Germany',
'GRC' => 'Greece',
'HUN' => 'Hungary',
'ISL' => 'Iceland',
'IRL' => 'Ireland',
'ITA' => 'Italy',
'KAZ' => 'Kazakhstan',
'RKS' => 'Kosovo',
'LVA' => 'Latvia',
'LIE' => 'Liechtenstein',
'LTU' => 'Lithuania',
'LUX' => 'Luxembourg',
'MLT' => 'Malta',
'MDA' => 'Moldova',
'MCO' => 'Monaco',
'MNE' => 'Montenegro',
'NLD' => 'Netherlands',
'MKD' => 'North Macedonia',
'NOR' => 'Norway',
'POL' => 'Poland',
'PRT' => 'Portugal',
'ROU' => 'Romania',
'RUS' => 'Russia',
'SMR' => 'San Marino',
'SRB' => 'Serbia',
'SVK' => 'Slovakia',
'SVN' => 'Slovenia',
'ESP' => 'Spain',
'SWE' => 'Sweden',
'CHE' => 'Switzerland',
'TUR' => 'Turkey',
'UKR' => 'Ukraine',
'UK' => 'UK',
);
$filtered_countries = array_intersect_key($country_list, array_flip($country_codes));
print_r($filtered_countries);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.1.25 - 7.1.32 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.4 , 8.3.6 Array
(
[IRL] => Ireland
[UK] => UK
)
Output for 8.3.5 Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Array
(
[IRL] => Ireland
[UK] => UK
)
preferences:dark mode live preview
185.21 ms | 402 KiB | 177 Q