[Solved] Unsetting Session In Array |
In my admin session i can unset the session like below
PHP Code: <?php In my controller I set the admin session like PHP Code: <?php On the logout controller what is the better way of unsetting the session in array I will be adding more in set session later.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Personally I always access the session variable directly.
PHP Code: // set session item Or for an array: PHP Code: // set session item array I think the set_userdata methods are deprecated now. Also, the unset userdata, I think, can only unset an entire key, not an element inside an array stored in the key. Whatever it is, accessing the session variable is IMHO cleaner, easier, more concise and more direct. Best wishes, Paul
(04-26-2017, 10:49 AM)PaulD Wrote: Personally I always access the session variable directly. Thanks will try it out
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(04-26-2017, 10:49 AM)PaulD Wrote: Personally I always access the session variable directly. Works fine now thank you Paul.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |