RE: [PHP] dynamically creating variable names

2002-06-26 Thread Lazor, Ed
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

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Erik Price
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;

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Lee P Reilly
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

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Rasmus Lerdorf
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?