如何在codeIgniter中将字符串转换为数组并将该值与另一个表及其值连接起来
function getpackages(){
$sql = "SELECT group_concat(Test_id separator ',') as Test_id FROM `tbl_package` ";
$query = $this->db->query($sql);
$array1 = $query->row_array();
$arr = explode(',',$array1['Test_id']);
$this->db->select('*');
$this->db->from('tbl_tests');
foreach ($arr as $rows)
{
$this->db->or_where('Test_id',$rows);
}
$query = $this->db->get();
return $query->result();
}