note 50071 added to ref.session
| From: | beliexp at yahoo dot com | Date: | Thu, 17 Feb 2005 07:29:56 +0000 |
| Subject: | note 50071 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85150@lists.php.net to get a copy of this message | ||
This is for tom(AT)darlingpet.com
I think that what you are explaining happens because what you have to put inside $_SESSION[] is the
name of a variable and there are rules for giving names. I don't remeber all of them but
I'm pretty sure one of them is that a variable name or identifier can't start with a
number. That's why your solution works because your variable names would be i1, i2, ...
You could always try $_SESSION[my_array[$i]], you may find it more handy.
----
Manual Page -- http://www.php.net/manual/en/ref.session.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50071
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50071&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50071&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50071&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50071&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50071&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50071&report=yes
Search -- http://master.php.net/manage/user-notes.php