I have a code which gives me list of addresses in my view file but some addresses are repeated. I don't want to display the ones which are already displayed.
$address_array[] = '-- Select address --';
foreach($address as $addres){
$address_array[$addres->id] = $addres->town;
}
Any idea on stopping the repetition?