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]
- Re: [PHP] passing variables Ben Weinberger
- Re: [PHP] passing variables george
- Re: [PHP] passing variables Ben Weinberger
- Re: [PHP] passing variables george
- [PHP] Converting String to Vari... Randy Johnson
- Re: [PHP] Converting String... Ernest E Vogelsinger
- RE: [PHP] Converting String... Randy Johnson
- RE: [PHP] Converting String... John Meyer
- [PHP] Page not found error Randy Johnson
- Re: [PHP] Page not found er... Lewis Bergman
- Re: [PHP] passing variables Chris Adams
- Re: [PHP] passing variables Terry Romine
- Re: [PHP] passing variables Michael Hall
- [PHP] passing variables george
- RE: [PHP] passing variables Hoover, Josh
- [PHP] passing variables Adam
- RE: [PHP] passing variables PHPBeginner.com
- [PHP] Passing variables Tarrant Costelloe
- Re: [PHP] Passing variables Mirek Novak
- Re: [PHP] Passing variables Peter Dudley
- [PHP] Passing Variables Steve Osborne