So $token here is an array of data from the database, I would like to retrieve it in the view. I know that the data is already there by using print_r($this->session->all_userdata());
but I would like to retrieve the values from the $token array and use it.
Controller:
$token['answer']=$this->Qmodel->get_answers();
$data= array(
'username' => $this->input->post('username'),
'is_logged'=> 1,
$token
);
$this->session->set_userdata($data);