Re: SESSION problem
| From: | tedd | Date: | Sat, 16 Aug 2008 22:22:37 +0000 |
| Subject: | Re: SESSION problem | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278235@lists.php.net to get a copy of this message | ||
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