I have function in my Contoller
public function dataCountry()
{
$this->country = array(
1 => 'Serbia',
2 => 'USA',
3 => 'Croatia',
4 => 'Russia',
5 => 'China'
);
}
Also at start class i have
$this->country = array();
So i have sql query where i am calling some info from database. I have result as
$item->country
Where i get result like this:
[country] => 1,4
So how can i change or effect that to replace and have "," between in result. I will do this before do view, i will change $item->country = "THAT REPLACE FROM COUNTRY". But i don't know how to do that.
Please help, thank you.