+ 1
why we use double dollar sign?
$ ??
4 Antworten
+ 6
The variable of the name in the variable:
$Bar = "a";
$Foo = "Bar";
$World = "Foo";
$Hello = "World";
$a = "Hello";
$a; //return Hello
$a; //return World
$$a; //return Foo
$$a; //return Bar
$$$a; //return a
$$$a; //return Hello
$$$$a; //return World
//... And so on
+ 2
Dmitri, the sixth dynamic variable ($$$a) won't return Hello. But instead it'll show an runtime error that the next variable (after echoing "a") is missing or not defined.
+ 1
$a="hello";
$hello="word";
echo $a;
actually $a is a variable that is using the value of another variable ,
in $a
$ denote it's a variable and
$a as it's name .
the value of $a is= to "hello" .
the resulting variable $hello , which is holds the value world.
0
used to print the next variable