-6

I've seen $$var in a php test for a job interview. I was wondering what was it ..

Thanks

Miles M.
  • 4,089
  • 12
  • 62
  • 108
  • It's a variable variable: http://www.php.net/manual/en/language.variables.variable.php – Mark Baker Apr 10 '13 at 16:40
  • 2
    [Manual](http://de3.php.net/manual/en/language.variables.variable.php), [Duplicate 1](http://stackoverflow.com/questions/2715654/what-does-mean-in-php), [Duplicate 2](http://stackoverflow.com/questions/4169882/what-is-in-php), [Duplicate 3](http://stackoverflow.com/questions/4891872/function-and-variable) – Kermit Apr 10 '13 at 16:41

3 Answers3

1

Variable variables - check the link out!

Variable variables

sark9012
  • 5,485
  • 18
  • 61
  • 99
0

This will refer to the value of particular variable.

Eg :

$test = "Hi";

$var  = "test";

Now $$var will display "Hi"

Edwin Alex
  • 5,118
  • 4
  • 28
  • 50
0
$var = 'something';
$$var = 'lol';

echo $something will output "lol"

it's a variable variable.

Kai Qing
  • 18,793
  • 5
  • 39
  • 57