-6

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

Thanks

Miles M.
  • 3,969
  • 11
  • 61
  • 104
  • 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,247
  • 17
  • 57
  • 95
0

This will refer to the value of particular variable.

Eg :

$test = "Hi";

$var  = "test";

Now $$var will display "Hi"

Edwin Alex
  • 5,048
  • 4
  • 27
  • 49
0
$var = 'something';
$$var = 'lol';

echo $something will output "lol"

it's a variable variable.

Kai Qing
  • 18,665
  • 5
  • 37
  • 57