Making a variable named after another var
Posted: Thu Oct 15, 2009 8:34 am
Hey there,
Is there a way to make a variable named after another var? I'm working on a project with an SQL-database, where I like to name a variable after a field of a table. I couldn't find an existing function to do this.
So for instance, the value of a field in my database is color. Now what I need is a way to get a variable that's named $color. This would help me a lot, less typing, much less.
Does anybody know a way to do this(or a function that does this)?
Gr. Mr.Paplu
Is there a way to make a variable named after another var? I'm working on a project with an SQL-database, where I like to name a variable after a field of a table. I couldn't find an existing function to do this.
So for instance, the value of a field in my database is color. Now what I need is a way to get a variable that's named $color. This would help me a lot, less typing, much less.
Does anybody know a way to do this(or a function that does this)?
Gr. Mr.Paplu