Q: Error Undefined offset in library codeigniter I created dynamic menu with Dynamic_menu.php library. Inside file I use active record
$query = $this->ci->db->get($table);

for calling table, but when I change $query to
$this->ci->db->select('*');
$this->ci->db->from('menu_master_new_copy');
$this->ci->db->where('parent_id', 0);
$query = $this->ci->db->get();

I get error:

Undefined offset

How to fix it ?
