[Solved] How to get the largest city of country using only the country code in PHP? [closed]


Extend to your needs, I already added the city you asked for:

$largest = [
    'fr' => 'paris',
];

$code="fr";

echo $largest[$code];

You can further improve this by wrapping it into a class supporting ArrayAccess giving a default value in case it does not exist.

5

solved How to get the largest city of country using only the country code in PHP? [closed]