RE: [PHP] string concatenation

From: Date: Thu, 26 Jul 2001 01:14:46 +0000
Subject: RE: [PHP] string concatenation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-59656@lists.php.net to get a copy of this message
Whoops meant to delete the old message. Doh. Variable variables eh? A topic I've always wondered about and never found in a manual for any of the languages I've used before. Will go and have a look now, cheers. - seb -----Original Message----- From: David Robley [mailto:huntsman@www.nisu.flinders.edu.au] Sent: 26 July 2001 02:10 To: Seb Frost; PHP Subject: Re: [PHP] string concatenation On Thu, 26 Jul 2001 06:54, Seb Frost wrote: > OK let's say in variable $search I have the string "color" (without the > quote marks). > > now I want to be able to refer to the variable $color in my code. > > How in gods name do I do this. I guess somehow I have to combine a "$" > with the contents of £search or something...? > > - seb Feel free to trim all the ireelevant stuff from your posts :-) Try $$search or ${color} depending on exactly what you want to do. You might want to have another read through the Variable variables section of the documentation to clarify this. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I tried switching to gum but couldn't keep it lit. -- 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 (#59656) next »