require_once('simple-php-country-list.php'); $countries = country_list(); foreach ($countries as $country) { echo $country['name'] . ' (' . $country['code'] . ')
'; }
require_once('country-flags.php'); $country_code = 'US'; $country_name = country($country_code, 'name'); $country_flag = flag($country_code); echo $country_name . 'This code imports the Country Flags package and sets the variable `$country_code` to 'US' for the United States. The code then uses the `country()` function to retrieve the United States' name and the `flag()` function to retrieve its flag image URL. The code finally prints out the country's name and flag image.
'; echo '';