get name of a string php code example
Example: php get variable by string name
${$variableName} or $$variableName;
//example:
$variableName = 'foo';
$foo = 'bar';
// The following are all equivalent, and all output "bar":
echo $foo;
echo ${$variableName};
echo $$variableName;