Re: Variable referencing/substitution
| From: | Fred | Date: | Sun, 20 Jan 2002 05:49:43 +0000 |
| Subject: | Re: Variable referencing/substitution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81256@lists.php.net to get a copy of this message | ||
See the manual on references:
http://php.he.net/manual/en/language.references.php
$vNames[1] = &$variable
Fred
Gaylen Fraley <gfraley5@earthlink.net> wrote in message
news:20020120044347.27790.qmail@pb1.pair.com...
> How can this be done?
>
> If I have the name of a variable that is stored in an array, how do I use
> the stored value to represent the actual variable?
>
> Example:
>
> $variable = "old value";
> $vNames[1] = '$variable'; //literal $variable
>
> I want to say $vNames[1] = "new value"; /and have $variable actually
> change.
>
> How?
>
> --
> Gaylen
> gfraley5@earthlink.net
> Home http://www.gaylenandmargie.com/
> PHP KISGB v3.1 Guest Book
> http://www.gaylenandmargie.com/phpwebsite/
>
>
>