Re: Re: dynamically naming PHP vars on the fly?
| From: | Govinda | Date: | Thu, 06 Aug 2009 18:42:49 +0000 |
| Subject: | Re: Re: dynamically naming PHP vars on the fly? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296392@lists.php.net to get a copy of this message | ||
Others have mentioned variable variables. While I have used those, I tend to prefer arrays: $var1 = 'apple'; $fruits[$var1] = 'organic'; echo $fruits[$var1]; /Nisseah, yes, I see that too, now. Thanks for reminding me about arrays. (You must be quite adept at arrays. ) (And to give you credit Nisse, I ended up going with your solution ('knock on wood'.. it is not all done yet) from the other php-db list (building an array from data returned from the 3 union all selects- query).) -G