CodeIgniter Forums
How can I pass an array from one 'page' to another? - 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: How can I pass an array from one 'page' to another? (/showthread.php?tid=22447)



How can I pass an array from one 'page' to another? - El Forum - 09-09-2009

[eluser]zuluanshee[/eluser]
I know i can use serialize, but how do you get it from one controller to the next?


How can I pass an array from one 'page' to another? - El Forum - 09-09-2009

[eluser]bretticus[/eluser]
[quote author="zuluanshee" date="1252577017"]I know i can use serialize, but how do you get it from one controller to the next?[/quote]

Are you passing dynamic data in your array or a static array?

EDIT: if this is static data just put it in one of your config files


How can I pass an array from one 'page' to another? - El Forum - 09-10-2009

[eluser]BrianDHall[/eluser]
Are you looking for Sessions? Sessions hold variables across controlllers just fine. If that isn't acceptable you could, I suppose, serialize and urlencode it and pass it as part of the uri string, but that'd be a long url link Smile


How can I pass an array from one 'page' to another? - El Forum - 09-10-2009

[eluser]Aken[/eluser]
The best method will depend on what you're trying to accomplish. Give us some details on what you want to do and someone will recommend something Smile


How can I pass an array from one 'page' to another? - El Forum - 09-10-2009

[eluser]zuluanshee[/eluser]
i trying to implement a breadcrumbs. i know there are breadcrumb classes but i cna't get them to work.