On 3 Mar 2001 08:02:16 -0800, Randy Johnson <[EMAIL PROTECTED]> wrote:
>Is there anyway to convert a string to a variable
>
>example
>
>$str="monday"; 
>
>I would like to then do this:
>
>$monday="blah";

extract() does something like that for arrays. There's no way to write the code
the way you have it, but you could use this syntax, which is equivalent:
        $$str = "blah";
        $GLOBALS[$str] = "blah";

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to