Re: Creating variable names from values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They are called 'variable variables': http://www.php.net/manual/en/language.variables.variable.php and it is under .... variables!

Satyam

PS: it sounds obvious once said, but it's usage might not be, so I meant the pun, but not to tease you.

----- Original Message ----- From: "Otto Wyss" <otto.wyss@xxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, March 08, 2007 8:16 PM
Subject: Re:  Creating variable names from values


Satyam wrote:

    $key = 'K' . $key;
   if ($$key) {

notice double dollar sign, it means, not the value of $key but the value of the variable $key says.

Thanks, any idea where this is described in the PHP manual? Searching
for "$$" produces no results.

O. Wyss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.7/713 - Release Date: 07/03/2007 9:24



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux