title: Codeigniter echo session Multidimensional Array variable
body: <p>Okay im using codeigniter and i got a session where i want to echo [user_id], i can see its an "Multidimensional Array", but i cant seem to get it right...</p>
  
  <p>This is the print_r from all session userdata:</p>
  
  <pre><code>Array ( 
  [session_id] =&gt; b7e721332248 
  [ip_address] =&gt; ::1 
  [user_agent] =&gt; Mozilla/5.0 
  [last_activity] =&gt; 1409104940 
  [user_data] =&gt; [name] =&gt; 2 [uniq] =&gt; 2 
  [flexi_auth] =&gt; Array ( [user_identifier] =&gt; mail.com [user_id] =&gt; 2 [admin] =&gt; 1 
  [group] =&gt; Array ( [3] =&gt; Master Admin ) 
  [privileges] =&gt; Array ( ) 
  [logged_in_via_password] =&gt; 1 
  [login_session_token] =&gt; 11017021313jhbjh1h2j3b213mab913269d95 ) )
  </code></pre>
  
  <p>if i type:</p>
  
  <ol>
  <li><code>print_r($this-&gt;session-&gt;all_userdata());</code> // i will get all</li>
  <li><code>echo $this-&gt;session-&gt;userdata('uniq');</code> //returns 2</li>
  <li><code>echo $this-&gt;session-&gt;userdata('user_id');</code> //returns nothing(THIS IS THE PROBLEM)</li>
  </ol>
  
  <p>Ive tried something like this:
  <code>$this-&gt;session-&gt;userdata(1,1);</code> //1,1 would be array 2 and number 2 which would be user_id</p>
  
  <p>Is it because i can only print out if I loop through them somehow?</p>