I set session in a controller method like & redirect to some other controller.
$search = array(
'search_count' => count($data['result']),
'projectInfo' => $data['result']
);
$this->session->set_userdata($search);
redirect('projects');
but if I try to access this variable in other controller it shows nothing:
print_r($this->session->userdata('projectInfo'));
Solved I used PHP Native Session class