A variável
was created called bebida
with its value being Refrigerante
.
Then a variable of variable bebida
was created with the value Guaraná
.
Why use this, when can I simply create a drink variable and equate guarana?
<?php
$bebida = "Refrigerante";
$$bebida = "Guarana";
echo $Refrigerante;
?>
Is there an example of actual usage in which it is necessary to use variable variables instead of the classic declaration of variables?