note 43642 added to function.session-is-registered
| From: | steveatfakesterdesignscom at rn2 dot php dot net | Date: | Tue, 29 Jun 2004 00:21:28 +0000 |
| Subject: | note 43642 added to function.session-is-registered | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72081@lists.php.net to get a copy of this message | ||
since it seems a little tedious to use $_SESSION['var'] all over my code, I just make a
reference at the start of my page and use the simple reference name thereafter.
<?
session_start();
$myName = &$_SESSION['myName'];
echo($myName);
?>
This is, of course, only a reference and not a copy. So if you change the local variable, It'll
be changed in the $_SESSION global array as well. This could be good or bad, so just be aware of
what you're doing.
----
Manual Page -- http://www.php.net/manual/en/function.session-is-registered.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43642
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43642&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43642&report=yes
Search -- http://master.php.net/manage/user-notes.php