double $ statement in php

209 views Asked by At

What does the double $ statement stands for in PHP?

2

There are 2 answers

4
Paolo Bergantino 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
Quentin On

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

(It is a variable variable)