Difference between $variable and $$variable

Indirect Reference used in the $$variable.
We explain the difference between $variable and $$variable through below example:-

Suppose, we create two variables.
(1) $variable which has value name.
(2) second variable name is the value of the first variable.

$variable = "name";
echo $$variable;
Output: John

Work Flow of the above example


$$variable now process will work from right to left.


after that output is