Appending to session array - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Appending to session array (/showthread.php?tid=50231) |
Appending to session array - El Forum - 03-19-2012 [eluser]Unknown[/eluser] In my core controller I'm trying to create an array of the user's history. I am creating an array and then setting the key as the time and the value as the page URL. However the problem that I'm having is that the previous array seems to get overwritten so there is only ever one key and value pair in the array. How can I do it so that instead each page will get appended to the array Code: $history = array( Thanks for any help Appending to session array - El Forum - 03-19-2012 [eluser]Krzemo[/eluser] Code: $history = $this->session->userdata('history'); |