08-17-2010, 06:48 PM
[eluser]Unknown[/eluser]
I was hoping to get the data as int/str. Am I doing something wrong or this is supposed to be like this? If yes, then is there a way to extract the wanted int without getting 'messy'?
Code:
$id = 1;
$custom_session_data = array('id' => $id);
$this->session->set_userdata($custom_session_data);
$id = $this->session->userdata('id');
print_r($id);
Array ( [0] => stdClass Object ( [id] => 1 ) )