Re: SESSION problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 5:15 PM +0100 8/16/08, Stut wrote:
Instead I assert you would have...

$_SESSION['user_purchase'][0] = $item0;
...
$_SESSION['user_purchase'][9] = $item9;

which is perfectly valid.

I'll try to re-word my basic point... I personally consider it bad to even want to use numeric indexes at the root level of the $_SESSION array because it creates data with no context in a globally accessible location.


Ahhh, I see with what you're saying -- that's a good point.

For my temp variables, I should have used some like:

$_SESSION['tedd_temps'][0] = $item0;
...
$_SESSION['tedd_temps'][9] = $item9;

That would have fit much better if I had been programming in a group.

Thanks for taking the time to explain that.

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux