0

$a

why we use double dollar sign ? what's the difference between single dollar sign and double dollar sign?

21st Aug 2016, 5:20 AM
Parveen
Parveen - avatar
6 Answers
+ 5
This is known as variable variable For an example : $a='x'; $b='y'; $y=15; echo $a;//outputs as x echo $b;//outputs as y echo $y;//outputs as 15 echo $b;//outputs as 15 Here we need to assign the value of $b equal to another variable name. So that when we use double dollar sign it is significant.
22nd Aug 2016, 9:42 AM
Abhishek Upadhyay
Abhishek Upadhyay - avatar
+ 1
it's called variable variable $a = 'b'; $b = 'c'; echo $a; // output: b echo $a; // output: c. $a is $b which is c
21st Aug 2016, 10:47 AM
Satyajit Chakraborty
+ 1
if there are $a = '2'; $c = '6'; $g = '15'; that echo $c output 15?
21st Aug 2016, 10:57 PM
Iwo Chorzępa
+ 1
var var yeah😌
4th Sep 2016, 1:20 PM
a 14 years old developer
a 14 years old developer - avatar
0
With the $a / $a = "ba"; The variable which is called $ba will be called
22nd Aug 2016, 1:33 AM
GlennV
0
aaaa! Thank you.
22nd Aug 2016, 7:19 AM
Iwo Chorzępa