title: unsetting session array value in Codeigniter
body: <p>Here is my session array:</p>
  
  <pre><code>[inactivefilter] =&gt; Array
      (
          [0] =&gt; add
          [1] =&gt; new
      )
  
  [filter] =&gt; Array
      (
          [0] =&gt; new
      )
  </code></pre>
  
  <p>'Add' and 'New' are dynamically generated by the user.  </p>
  
  <p>I currently send the value of the array to my controller, then am stuck on what the model should do.</p>
  
  <pre><code>    public function clear_filter()
      {
          $i = $this-&gt;input-&gt;post('filtervalue');
          $this-&gt;thread_model-&gt;clear_filter($i);
      }
  </code></pre>
  
  <p><code>$i</code> would equal whatever value they click on.  So if they clicked 'add' <code>$i = add</code></p>
  
  <p>I need to unset both activefilter and filter based on whatever the value of $i is.  Is there an easy way to do it?</p>
  
  <p>I've read about array_splice, array_diff, and some other ways, but had no success.</p>