+ 1
How $ variable works?
how $ variable works in php $a="name"; $a="age"; echo $name; //output : age
2 ответов
+ 3
$name = $(name)=$($a) = $a = age
+ 7
variables with $ change their name according to the string the one with only $ contains.
so in your example $a becomes $name, because $a contains the string "name".
I'm still searching for a practical use for this. never needed it before. can be really confusing.