Example #1
0
if ($userCount > 0) {
    foreach ($citybyprovinceid as $Cities) {
        $cityid = $Cities->getCityId();
        $cityname = $Cities->getCityName();
        ?>

            <?php 
        echo "The user is: " . $cityname . "<br>";
        ?>

            <?php 
    }
    // end of foreach loop
}
// end of if statement
$countrybycityname = $LocationManager->getCountryByCityName("Toronto");
echo "<br/><br/><br/><b>Country By City Name</b><br>";
$countryid = $countrybycityname->getCountryId();
$countryname = $countrybycityname->getCountryName();
$countrycode = $countrybycityname->getCountryCode();
echo "The Country  is: " . $countryname . "<br>";
$countryByCityId = $LocationManager->getCountryByCityId(1);
echo "<br/><br/><br/><b>Country By City Id</b><br>";
$countryid = $countrybycityname->getCountryId();
$countryname = $countrybycityname->getCountryName();
$countrycode = $countrybycityname->getCountryCode();
echo "The Country  is: " . $countryname . "<br>";
$countryByProvinceName = $LocationManager->getCountryByProvinceName("ontario");
echo "<br/><br/><br/><b>Country By Provice Name</b><br>";
$countryid = $countryByProvinceName->getCountryId();
$countryname = $countryByProvinceName->getCountryName();