Hi,
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
$$foo = blah;
that will set $bar equal to blah.
-Dan Joseph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tue, 17 Jun 2003, Antti wrote:
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
How do I do this?
?php
$foo = 'bar';
$$foo = 'barvalue';
print $bar;
?
This prints barvalue.
--
Mika Tuupola
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
How do I do this?
$$foo
see: http://www.php.net/manual/en/language.variables.variable.php
-
michal
$$foo or ${$foo} somethinbg like that ?
http://us2.php.net/manual/en/language.variables.variable.php
R'twick
- Original Message -
From: Antti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 2:19 PM
Subject: [PHP] Naming a variable with a variable
Ho can I create
4 matches
Mail list logo