How does php handle something like this...
$blah = "Testing a variable";
$$blah = "test";
What would my new variable name be?
How does php handle something like this...
$blah = "Testing a variable";
$$blah = "test";
What would my new variable name be?
Everything you need to know about variable variables at http://www.php.net/manual/en/language.variables.variable.php, except for one thing: don't use them.
echo ${'Testing a variable'};
However, you don't want to do this in practice. It makes for unmaintainable, bug-prone code.
The variable $blah
must contain a valid variable name.
This will tell you about variables: http://www.php.net/manual/en/language.variables.basics.php
Not really an answer, but...
<?php
function I_love_you()
{
return "haha";
}
$haha = "HoHoHo";
$tom = "I_love_you";
$blah = "tom";
echo ${$$blah()};
?>