Welcome Guest, Not a member yet? Register   Sign In
Can I create, and then add values, to an existing array, using the Session Class?
#1

[eluser]callumd[/eluser]
Eg, I'd like to be able to do the equivalent of this:

Code:
$_SESSION['some_value'][] = 'Adding a numerically indexed value to the some_value array';

** some other code **

And then this:

Code:
$_SESSION['some_value'][] = 'Adding yet another value to the some_value array';

I want to be able to add these values at any time, not all in one hit by passing a single array to the session class, eg:
Code:
$this->session->set_userdata($some_array);

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB