double $ statement in php

207 Views Asked by At

What does the double $ statement stands for in PHP?

2

There are 2 best solutions below

4
On BEST ANSWER

It means a variable variable:

$a = 'b';
$b = 'test';
print $$a; // test

For the most part (although there are exceptions if you know what you're doing) they are bad practice and whenever you see someone using them arrays are probably the better idea.

0
On

It means "The author should be using an associative array".

(It is a variable variable)