RE: How to unset session variable in codeigniter?

How to unset session variable in codeigniter?

B Mathur Team Leader Asked on February 12, 2017 in CODEIGNITER.
Add Comment
2 Answers
  /*unset session variable or data code */
 
 
$this ->session ->unset _userdata(‘your data’);   //unset specific key from session
 
                    $keys = array(‘data1’, ‘data2’, ‘data3’);
 
$this->session->unset_userdata($keys);     // unset multiple data at one times
Senior Developer Answered on July 2, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.