It looks like you're new here. If you want to get involved, click one of these buttons!
What is the difference between $name and $$name in PHP?
Double dollar sign makes a variable with the name equal to value of original variable.
$var = 'foo';
$$var = 'bar';
echo $foo; // output: bar
$name is variable where as
$$name is reference variable like $name=swati
and $$name=tyagi so $swati value is tyagi
Example with output
Output would be :
For more precise answer Difference between $name and $$name in PHP