title: How to Destroy All Session With Exceptional in Codeigniter?
body: <p>In my code, I have logout function as below</p>
  
  <pre><code>function logout() 
  {
      $this-&gt;session-&gt;sess_destroy();  
  
      // but, don't destroy this session
      $this-&gt;session-&gt;userdata('admin_id');
  }
  </code></pre>
  
  <p>How to destroy all session, except 'admin_id'?</p>