This question already has an answer here:
I am trying to learn php, and I saw this in a foreach loop what does it mean? I understand &$var which its a direct reference to the memory address of the object. But what does $$var means? what is it exactly?
This is the example.
foreach($this->vars as $key => $value)
{
$$key = $value;
echo "$$Key: " . $$key;
echo "Key: " . $key;
echo "<br/>";
echo "Value: " . $value;
}
</div>