[eluser]tusukgigi[/eluser]
this is my view
if(count($getCountry)){
foreach($getCountry as $key=>$list){
echo $list['district_name']."<br />";
echo $list['city_name']."<br />";
}
}
$getCountry is a variable from controller
this is my model database
SELECT DISTINCT city_name, district_name FROM district LEFT JOIN city ON city.district_id = district.id
and this is the result
country1
jakarta
country1
bandung
country2
newyork
....
there is a COUNTRY repeat's