|
Posted by Steve on 04/23/07 13:41
"Boris Savc" <boris.savc@siol.net> wrote in message
news:Xf%Wh.741$553.592020@news.siol.net...
| Sorry for confuzing subject, but that's the thing I'm trying to achieve.
For
| example:
|
| $a = "Hello";
| $b = 1;
|
| I want to change the name of $a to $a1 where 1 is value of variable $b!
either use $a as an array having the keys be the differring values of $b as
someone suggested, or get into the magical, mystical world of shitty
development practices such as:
$${'a' . $b};
that makes for VERY easily maintained code since it shows exactly where a
variable comes from, what role it plays in your code, it's type, etc., etc.
knock yourself out! all i can say is that i hope you turn pro using code
like that. means i will get a raise. :)
(sorry to sound snippy with you. i'm just playing. i'm being extreme so that
the point is driven home to you that, although it can be done, it's not a
good idea...either way, the above is how you can do it.)
[Back to original message]
|