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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to