-6

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

Thanks

Miles M.
  • 3,799
  • 9
  • 53
  • 94
  • 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
  • 4,905
  • 16
  • 52
  • 90
0

This will refer to the value of particular variable.

Eg :

$test = "Hi";

$var  = "test";

Now $$var will display "Hi"

Edwin Alex
  • 4,948
  • 4
  • 26
  • 49
0
$var = 'something';
$$var = 'lol';

echo $something will output "lol"

it's a variable variable.

Kai Qing
  • 18,359
  • 5
  • 34
  • 56