codeigniter get session data in controller

Today, We want to share with you print session in codeigniter.In this post we will show you codeigniter get sessions data in view, hear for sessions and cookies in codeigniter we will give you demo and example for implement.In this post, we will learn about Session Management in CodeIgniter with PHP with an example.

Codeigniter print session data variable array

print_r($this->session->userdata);

Example : Codeigniter print sessions data variable array

$sessionData = $this->session->all_userdata();
print_r($sessionData);

Showing all session data at once?

print_r($this->session->userdata); 

///or

echo "<pre>";
print_r($this->session->all_userdata());
echo "</pre>";

I hope you get an idea about print sessions in codeigniter.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.