DevShed: Using Variable Variables in PHP

Tuesday Feb 27th 2001 by ServerWatch Staff
Share:

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.

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

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

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved