Re: Re: IS THIS A BUG?
| From: | Robert Cummings | Date: | Wed, 27 Aug 2003 22:48:17 +0000 |
| Subject: | Re: Re: IS THIS A BUG? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160979@lists.php.net to get a copy of this message | ||
This functionality is a feature and is commonly called variable
variables.
http://www.php.net/variables.variable
Cheers,
Rob.
On Wed, 2003-08-27 at 16:42, DvDmanDT wrote:
> Considering the manual has examples using that method (or at least had), and
> many tutorials, I think you can use it...
> When using register_globals=off, this might be off intrest: (notice $$var)
> while(list($var,$val)=each($_REQUEST))$$var=$val;
>
> --
> // DvDmanDT
> MSN: dvdmandt@hotmail.com
> Mail: dvdmandt@telia.com
> "Steve Todd" <steve_todd@blueyonder.co.uk> skrev i meddelandet
> news:000501c36cd9$ad9bae70$4d782a52@speedchild...
> > Is it possible to define a variable, such as:
> > $foo = "bar";
> >
> > and then do as follows to create a totally different variable:
> > $$foo = "text here";
> >
> > this seems to mean $bar = "text here";.
> >
> > Is this a bug or can we legally use it.
> >
> > Steve
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'