DevShed: Using Variable Variables in PHP

By ServerWatch Staff (Send Email)
Posted Feb 27, 2001


"Quite possibly one of PHP's least utilized yet most valuable features is its support for Variable Variables. ..."

"A variable variable is, in short, a method of using the value of one variable to call the name of another. For instance, if I had a variable with the value of "Eric", I could set a variable to "Seufert" by simply writing 25640x = "Seufert". This process calls the value of and then creates a variable out of it. ..." Quite possibly one of PHP's least utilized yet most valuable features is its support for Variable Variables. ... A variable variable is, in short, a method of using the value of one variable to call the name of another. For instance, if I had a variable with the value of Eric, I could set a variable to Seufert by simply writing 25637x = Seufert. This process calls the value of and then creates a variable out of it.

"... Variable Variables make working with forms and other such user-input easier because they allow you to centralize all the available options. ..."

Page 1 of 1


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.