Question and answer is powered by AnsPress.io
$var = ‘foo’;
$$var = ‘bar’;
echo $foo;
What will be the output?
$name=abc;
$$name=xyz;
The value of $name will be also a variable. when we write $$name.
Example.
echo$name;
Output: abc
echo$abc;
Output: xyz
echo$$name;
Output: xyz