Re: Variables within variable names

From: Date: Fri, 03 May 2002 05:25:57 +0000
Subject: Re: Variables within variable names
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95832@lists.php.net to get a copy of this message
I agree with Jason and Miguel, but if you really want to do this, you could try: $type = "basic"; $user = $type."_user"; $$user = "jaxn"; echo $basic_user; I can see where something like this *could* be useful, but I'd still use the arrays. Jim. At 12:43 PM 5/2/02, Jackson Miller wrote:
I want to do something along the lines of: $type = "basic"; $$type_user = "jaxn"; echo $basic_user; and have the output be "jaxn".


« previous php.general (#95832) next »