[eluser]Rok Biderman[/eluser]
Now, i'm sure that there are a more elegant ways to do this, but this one works as well.
Code:
function oneatatime($args)
{
$this->db->distinct();
$this->db->select($args);
$query = $this->db->get('narocniki');
return $query->result();
}
function alldatainsinglearray()
{
$myarray = array();
$tour_type1 = ($this->oneatatime('tour_type1'));
foreach ($tour_type1 as $item):
array_push($myarray, $item->tour_type1);
endforeach;
$tour_type2 = ($this->oneatatime('tour_type2'));
foreach ($tour_type2 as $item):
array_push($myarray, $item->tour_type2);
endforeach;
$tour_type3 = ($this->oneatatime('tour_type3'));
foreach ($tour_type3 as $item):
array_push($myarray, $item->tour_type3);
endforeach;
return $myarray;
}
Hope it helps.