Re: a value of variable as a name of variable

From: Date: Wed, 15 Nov 2000 10:48:51 +0000
Subject: Re: a value of variable as a name of variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25409@lists.php.net to get a copy of this message
use this code if you want the value of $vl_hod be "weight" as well... $quality[1]="weight"; $vl_hod=$quality[1]; Pavel ----- Original Message ----- From: <petr.juza@worldonline.cz> To: <php-general@lists.php.net> Sent: Wednesday, November 15, 2000 11:50 AM Subject: [PHP] a value of variable as a name of variable > > I have variable with this value: > $quality[1]="weight"; > $vl_hod="$quality[1]"; > > And I want use the value(!!) of variable $vl_hod as a name of > variable for the next use. Is it possible to do it? > > For example: > ???echo $vl_hod;???? > I want that the output of "echo" was the value "weight" and > no the value "$quality[1]". > > Please, can somebody help me? > > Thank you very much? > > > ------------------------------------------------- > Tento e-mail byl odeslán ze serveru www.worldmail.cz > > -- > 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 (#25409) next »