Can you suggest me what will be the good way to convert result without duplication?
$numbers = array ('1', '5', '10');
foreach ($numbers as $number){
$query[] = $this->db->query("SELECT name, country FROM name WHERE id= '" . (int)$number .'"")
}
Result
Array (
Array (
name = ivan
country = en
)
Array(
name = Peter
country = en
)
Array (
name = sisi's
country = en
)
)
How can I sort result like this
Array(
country = en
name = array (
sisi's
Peter
Ivan
)
)