• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keep multidimensional session value

#1
[eluser]Unknown[/eluser]
Hi
i have a session like this:
Code:
Array
(
    [session_id] => 4a5a5dca22728fb0a84364eeb405b601
    [ip_address] => 127.0.0.1
    [user_agent] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7;
    [last_activity] => 1303142623
    [data] => array(
                                 [user_name] => 'admin',
                                 [user_type] => 'test',
    )
)

for keep session_id i use:
Code:
$this->session->userdata('session_id');

while for keep "user_name" value?


regards
Denny3d

#2
[eluser]InsiteFX[/eluser]
Make data a text field and serialize the array then you can save it as a string.


#3
[eluser]Unknown[/eluser]
ok, but i found a method to keep directly a value from session array into view and i dont foreach into controller.
there is a way to do it?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.