Welcome Guest, Not a member yet? Register   Sign In
Multi dimensional array in Sessions
#5

[eluser]MadZad[/eluser]
First, I'd second Negligence's suggestion for the quickest path to a solution.

FWIW I'm utilizing the Session class. For simplicity, I'm putting a many-dimensional array into one index of the session array:
Code:
$this->session->set_userdata('datafile', $xls_return);

Later I retrieve it:
Code:
$datafile = $this->session->userdata('datafile');
Then start looping over the pertinent section of $datafile. In our case, there's a 2-dimensional array under $datafile["cell"] that contains the content of an Excel input file. Therefore, I never even think about updating the session with individual bits of the array, even in a loop. Just read and write the whole thing at once. Works like a champ.

I'm using the OBsession addition (with CI 1.6.1), but that is probably irrelevant to this thread. Further irrelevant to this discussion is the use of Excel Parser Professional by Algera - it's just a nice little tool that works well for us.


Messages In This Thread
Multi dimensional array in Sessions - by El Forum - 02-24-2008, 02:48 PM
Multi dimensional array in Sessions - by El Forum - 02-24-2008, 03:08 PM
Multi dimensional array in Sessions - by El Forum - 02-24-2008, 03:49 PM
Multi dimensional array in Sessions - by El Forum - 02-25-2008, 06:49 AM
Multi dimensional array in Sessions - by El Forum - 02-29-2008, 12:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB