Re: Assign a variable with another variables value

From: Date: Mon, 02 Dec 2002 02:31:43 +0000
Subject: Re: Assign a variable with another variables value
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23754@lists.php.net to get a copy of this message
$foo = "BAR"; $varname = "new$foo"; $$varname = "some string"; Martin Allan Jensen wrote:
Hi folks, I probably need a little help the next couble of days, but well here is the first question. How can i assign a variable with the value of another variable ?? Example: $foo = "BAR"; $newBAR = "some string"; The BAR is supposed to be taken from the value of $foo. THANKS A LOT!!! Regards, Martin Allan Jensen
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.db (#23754) next »