I have a situation where I need to get the value of a variable, where the name od the variable is passed in a string in a second variable.
For example
$abc = 'the value I want';
$def = 'abc';
Where $def is the only variable name I can garrauntee being accessible. In this situation how can I get the value of $abc.
Cheers
echo $$def;does the job.Use it very sparsely though, it makes code difficult to maintain!