Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Arrays as Session Variables?
- Alan M Dunsmuir
March 8, 2008, 5:44 am
rate this thread
from which I can create a list of all the records of a particular type
which already exist.
I'd then have to store the identifiers of all these existing records as
the members of an associative array, but I'd have to be able to copy
this array's members to a Session Variable.
Is this possible?
Can I do
rec['A']['B'] = true;
rec['C']['D'] = true;
$_SESSION['recs'] = rec;
Re: Arrays as Session Variables?
Alan M Dunsmuir wrote:
Not at all.
First of all, you are prematurely optimizing. Secondly, your premature
optimization may slow down the system. And finally, you're creating
more code, which has to be debugged and maintained.
But then why not just store everything in a flat file? Then you don't
even need a database.
Remove the "x" from my email address
JDS Computer Training Corp.