Re: Re[2]: [PHP] sessions help
| From: | Miguel Cruz | Date: | Fri, 14 Jun 2002 06:51:26 +0000 |
| Subject: | Re: Re[2]: [PHP] sessions help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102174@lists.php.net to get a copy of this message | ||
On Thu, 13 Jun 2002, Kevin Stone wrote:
> Your problem is here..
> > return ($_SESSION['node'] = $node_id);
>
> I do not believe that you can both set and return a varaible on the same
> line. FYI, the variable which you're returning in this function is global..
> so there's no reason to return it anyway. Just fill the index and you're
> all set.
There's no particular reason that in itself shouldn't work - the return
value of an assignment is the result of the assignment.
Try:
$i = 1;
echo $i = $i + 3;
miguel