public static function countriesList()
    {
        $path = dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR.'data/countries.json';
        $countries = self::readJson($path, true);

        $listCountries = [];

        foreach ($countries['Names'] as $code => $value) {
            $listCountries[$code] = $value;
        }

        return $listCountries;
    }
public static function countriesList()
    {
        $path = dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR.'data/countries.json';
        $countries = self::readJson($path, true);

        $listCountries = [];

        foreach ($countries['Names'] as $code => $value) {
            $listCountries[$code] = $value;
        }

        return $listCountries;
    }
public static function countriesList ( ) { $ path = dirname ( realpath ( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'data/countries.json' ; $ countries = self :: readJson ( $ path , true ) ; $ listCountries = [ ] ; foreach ( $ countries [ 'Names' ] as $ code => $ value ) { $ listCountries [ $ code ] = $ value ; } return $ listCountries ; }
returns a list of countries and there codes
@return array
returns a list of countries and there codes