Variable Variables
This lesson introduces variable variables, also called dynamic variables, and discusses how you can use them in PHP.
We'll cover the following...
What are Variable Variables? #
Using PHP, we can access data through dynamic variable names. The name of a variable can be stored in another variable, allowing it to be accessed dynamically. Such variables are known as variable variables.
To turn a variable into a variable variable, you put an extra $
sign in front of your variable. This method is illustrated in the following figure: