<?php // Include utility files require_once '../config.php'; require_once BUSINESS_DIR_LOCATION . 'LocationManager.php'; $LocationManager = new LocationManager(); $arrayval[] = ""; $Country = $LocationManager->getCountries(); echo "<br/><br/><br/><b>See All Countries</b><br>"; $userCount = count($Country); $i = 0; if ($userCount > 0) { foreach ($Country as $country) { $i++; $countryid = $country->getCountryId(); $countryname = $country->getCountryName(); $countrycode = $country->getCountryCode(); $arrayval[$i] = $countryname; echo "The user is: testest" . $countryname . "<br/>"; } // end of foreach loop //$data = json_encode($arrayval); } // end of if statement //For Provinces $provincesbycountryid = $LocationManager->getProvincesByCountryId(1); $getProvincesByCountryName = $LocationManager->getProvincesByCountryName("AfghAnistan"); $citybyCountryid = $LocationManager->getCitiesByCountryId(1); $citybyprovinceid = $LocationManager->getCitiesByProvinceId(1); echo "<br/><br/><br/><b>Provinces by CountryId</b><br>"; $userCount = count($provincesbycountryid); if ($userCount > 0) {