session functions and variable variables
| From: | lists at itsg dot net dot au | Date: | Wed, 24 May 2000 08:08:48 +0000 |
| Subject: | session functions and variable variables | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19358@lists.php.net to get a copy of this message | ||
i have looked far and wide for info on this subject, so
if i am being redundant accept my apologies in advance 8^)
if i have an array like this:
$vars[] = "var1";
$vars[] = "var2";
$vars[] = "var3";
is there any way to use the session functions
(_register,_is_registered,_unregister in particular) to perform an
operation on the contents of the $vars array as variables?
i have tried:
* session_register("$$vars[$i]");
* session_register("${$vars[$i]}");
* session_register($$vars[$i]);
* session_register(${$vars[$i]});
and none of them seem to work. am i doing something wrong?
thanks for your attention,
- avi