Speed up development with full-stack environments for every branch.

Learn More

How to get country list in HTML format, with flag images [PHP]

Forked from How to get country list in JSON format.

843 Runs 2641 Views 195 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php

/*
 * PHP Country-list - How to get country list in HTML format, with flag images
 */

//source can be either clrd or icu
$source = "cldr";
$language = "en";
$format = "flags.html";

//get the list
$list = file_get_contents("country/".$source."/".$language."/country.".$format);
//display the list
echo $list;
?>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).