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: [EMAIL PROTECTED]
> Mail: [EMAIL PROTECTED]
> "Steve Todd" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > 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.    |
`---------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to