<?php $myCountry = // your api call .... echo '<html><head></head><body>' echo $myCountry; echo '</body>';