title: How do I get the Array value using Codeigniter
body: <p>I have this select </p>
  
  <pre><code>    $this-&gt;db-&gt;select('modulo_regra.regra_descricao');
      $this-&gt;db-&gt;from('modulo_regra');
      $this-&gt;db-&gt;where('modulo_regra.modulo_regra_id', id);
      $query = $this-&gt;db-&gt;get();
  </code></pre>
  
  <p>that return to me 2 elements in</p>
  
  <pre><code>  return $query-&gt;result_array();
  </code></pre>
  
  <p>Then I put the return in a Array</p>
  
  <pre><code>   $permissoes =array('areas' =&gt; $this-&gt;Regra_model-&gt;user_has($regra['regra_id']));
  </code></pre>
  
  <p>then I the $permissoes  to the session</p>
  
  <pre><code>   $this-&gt;session-&gt;set_userdata($permissoes);
  </code></pre>
  
  <p>So the real problem comes here.
  when I'm loading the value from session </p>
  
  <pre><code>   $permissoes = array('areas');
     $permissoes = $this-&gt;session-&gt;userdata('areas'); 
  </code></pre>
  
  <p>this is its content: </p>
  
  <pre><code>array(2) ([0] =&gt; array(1) ([regra_descricao] =&gt; (string) clientes_cadastrar)
            [1] =&gt; array(1) ([regra_descricao] =&gt; (string) clientes_visualizar))
  </code></pre>
  
  <p>So i can't validate it with the in_array(), or other way...I would like to know if there is how if there is away to compare  the value in this array with one another variable</p>
  
  <p>like  </p>
  
  <pre><code>if(in_array('clientes_cadastrar',$permissoes)){}
  </code></pre>
  
  <p>I'm new on it... so sorry for the way i ask.</p>