dcsimg

DevShed: Using Variable Variables in PHP


"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. ..."

This article was originally published on Feb 27, 2001
Page 1 of 1

Thanks for your registration, follow us on our social networks to keep up-to-date