Re: Creating a Variable with the Name of a string

From: Date: Fri, 06 Jul 2001 22:05:07 +0000
Subject: Re: Creating a Variable with the Name of a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56579@lists.php.net to get a copy of this message
Thanks ----- Original Message ----- From: "scott [gts]" <scott@graphictype.com> To: "php" <php-general@lists.php.net> Sent: Friday, July 06, 2001 4:27 PM Subject: RE: [PHP] Creating a Variable with the Name of a string > try using assoc. arrays also... > they're much nicer to deal with ;) > > > > -----Original Message----- > > From: James Atkinson [mailto:james.atkinson@100world.ca] > > Sent: Friday, July 06, 2001 4:20 PM > > To: Chris Anderson; php-general@lists.php.net > > Subject: RE: [PHP] Creating a Variable with the Name of a string > > > > > > $temp = "myvar"; > > $$temp = "My value"; > > > > echo $myvar; > > > > output: > > My value > > > > - James > > > > > -----Original Message----- > > > From: Chris Anderson [mailto:chrisderson@ameritech.net] > > > Sent: July 6, 2001 1:17 PM > > > To: php-general@lists.php.net > > > Subject: [PHP] Creating a Variable with the Name of a string > > > > > > > > > I know this has been discussed before, but I've searched the manual and > > > didn't see it under Variable functions, or any of my searches. > > > I have varible $temp, how can I create a variable whose name is the > > > string stored in $temp? Thanks in advance > > > > > > > -- > > 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 > > > > -- > 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 (#56579) next »