Mysql会话数据数组解释

I'm adding session data in my table using Codeigniter's session library.

From documentation:

$newdata = array(
                   'username'  => 'johndoe',
                   'email'     => 'johndoe@some-site.com',
                   'logged_in' => TRUE
               );

$this->session->set_userdata($newdata);

For example in my session table i get this code:

a:7:{s:9:"user_data";s:0:"";s:7:"user_id";s:2:"10";s:8:"username";s:0:"";s:9:"firstname";s:3:"Dan";s:8:"lastname";s:6:"Greeb";s:6:"status";s:1:"1";s:18:"settings_activated";i:1;}

I can't find any documentation on the meaning of all the letters and numbers. What does the syntax mean?

Please notice the last session item settings_activated. I'm using that to check if the user entered his/her settings. It's set to 1 or 0. What does the i mean?

To access all session userdata simply type:

$data = $this->session->all_userdata();

With this you can access

echo $data['username']; // gives "johndoe"

If you want something specific you can do

$username = $this->session->userdata('username');
echo $username;  // gives "johndoe"

As Wrikken mentioned above, the data you see in the actual table is serilized, and CI does not want you interacting with it directly - just use the Session class.