title: How can I get the value of a codeigniter session userdata variable?
body: <p>I have generated the array containing session data as,</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>array(8) {
    ["session_id"]=&gt; string(32) "1dc5eb3730601a3447650fa4453f36cd"
    ["ip_address"]=&gt; string(3) "::1" 
    ["user_agent"]=&gt; string(102) "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36" 
    ["last_activity"]=&gt; int(1427602284) 
    ["user_data"]=&gt; string(0) "" 
    ["roll_no"]=&gt; string(6) "111416" 
    ["is_logged_in"]=&gt; int(1) 
    [0]=&gt; object(stdClass)#20 (6) 
      { 
        ["name"]=&gt; string(13) "durex" 
        ["email"]=&gt; string(25) "durex@gmail.com" 
        ["year"]=&gt; string(1) "2" 
        ["semester"]=&gt; string(1) "4" 
        ["branch"]=&gt; string(2) "IT" 
        ["parent_email"]=&gt; string(27) "parent@durex.com" 
      } 
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I echo name(durex) using the above session $userdata? </p>