Pass array to where in Codeigniter Active Record
From the Active Record docs:
$this->db->where_in();
Generates a WHERE field IN ('item', 'item') SQL query joined with AND if appropriate
$names = array('Frank', 'Todd', 'James');$this->db->where_in('username', $names);// Produces: WHERE username IN ('Frank', 'Todd', 'James')