I think so. Try using double dollar signs.
$name = food;
$$name = pizza;
print $food;
-Original Message-
Can someone tell me if it's possible to create variable names from
varaible names?
This message is
On Wednesday, June 26, 2002, at 01:04 PM, Lee P Reilly wrote:
Can someone tell me if it's possible to create variable names from
varaible names? I could work around this problem using some if/else
statements, but I'm interested to see if there's another solution.
Just try it.
for ($i = 0;
Thanks for the replies. I'm still having a litte trouble though...
Say I have an array called $compX, and given the letter 'X'... how can I
access the variable $compX using these methods?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://www.php.net/manual/en/language.variables.variable.php
On Wed, 26 Jun 2002, Lee P Reilly wrote:
Thanks for the replies. I'm still having a litte trouble though...
Say I have an array called $compX, and given the letter 'X'... how can I
access the variable $compX using these methods?
4 matches
Mail list logo