what is “$$” in PHP

It’s evil is what it is.

That will take the value that’s in $textVarName and use that as a variable name. For example:

$foo = 'hello';
$hello = 'The Output';
echo $$foo; // displays "The Output"

Leave a Comment