RE: [PHP] Variable referencing/substitution

From: Date: Mon, 21 Jan 2002 01:24:41 +0000
Subject: RE: [PHP] Variable referencing/substitution
Groups: php.general 
Request: Send a blank email to php-general+get-81302@lists.php.net to get a copy of this message
${$vNames[1]} = "new value"; // look at variable-variables in the manual for more info -----Original Message----- From: Gaylen Fraley [mailto:gfraley5@earthlink.net] Sent: Sunday, January 20, 2002 3:44 PM To: php-general@lists.php.net Subject: [PHP] Variable referencing/substitution How can this be done? If I have the name of a variable that is stored in an array, how do I use the stored value to represent the actual variable? Example: $variable = "old value"; $vNames[1] = '$variable'; //literal $variable I want to say $vNames[1] = "new value"; /and have $variable actually change. How? -- Gaylen gfraley5@earthlink.net Home http://www.gaylenandmargie.com/ PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#81302) next »