+ 1

PhP variables

Can someone tell about this kind of variables? $name

9th Jan 2019, 2:03 PM
Gauhar Rahman Niazi
Gauhar Rahman Niazi  - avatar
3 Respuestas
+ 5
No when you define $yes $(this is for answer)$(original variable)yes; We defined $ sign two times just because we wanted answer of answer. If you want to make it three times you can do it. like this <?php $hey = "hello"; $yes = "hey"; $j = "yes"; echo $$j; ?>
9th Jan 2019, 2:24 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 5
They are something like value of value. Like we have a variable $hey = "hello"; And second variable $yes = "hey"; Now you say echo $yes; So it will find value of variable $yes which is "hey" and then it will find value of variable $hey which is "hello". So finally it will print hello in output.
9th Jan 2019, 2:10 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
thanks ! but bro i have question below $yes = “hey”; how the know and hey is also not has a $ sign
9th Jan 2019, 2:16 PM
Gauhar Rahman Niazi
Gauhar Rahman Niazi  - avatar