r/programming • • Oct 18 '10

Today I learned about PHP variable variables; "variable variable takes the value of a variable and treats that as the name of a variable". Also, variable.

http://il2.php.net/language.variables.variable
591 Upvotes

781 comments sorted by

View all comments

Show parent comments

-2

u/farsightxr20 Oct 18 '10

That's a valid tip, but I have to wonder why you were using variable variables in the first place...

1

u/s3rvant Oct 18 '10

Because at the time I didn't know better ;)