this is a prette neat trick:

$variable_name = “varname”;
${$variable_name} = “this is the value”;
echo $varname;