// include the country library require_once 'country.php'; // retrieve country details for ISO code "US" $country = Country::getByIso('US'); // display country name and capital echo $country->getName(); // prints "United States" echo $country->getCapital(); // prints "Washington, D.C."
// include the country library require_once 'country.php'; // retrieve country details for ISO code "IN" $country = Country::getByIso('IN'); // display country name and currency echo $country->getName(); // prints "India" echo $country->getCurrency(); // prints "INR"In this example, the getByIso function is used to retrieve the details of India. The output shows the country name and currency. The package library that contains the getByIso function could provide a list of countries with their detailed information. It can help in developing web applications that need country-specific information.