Difference between $variable and $$variable

We explain through example:- In this eg. we create two variable.
(1) $variable which has value is “name”.
(2) second variable name is the value of the first variable.

<?php
$variable = "name";
$name="John";
echo $$variable;
?>
Output: John

Work Flow of this:-
$$variable now change into $name after that output is “John”