• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Storing multidimensional array in session variable

I want  to store multidimensional array in session variable, 

In my method I store 3 dimensional array $this->session->set_userdata('shopping_cart', $cart); in this way,
 and after this line I printed it print_r($this->session->userdata('shopping_cart')); and this is retrieving the data I need, but after the method ends shopping_cart is erased from session somehow. I tried to put 1 dimesional array in session variable, it worked with no problems, but it is not working with multidimensional arrays.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

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