Hello. I've been trying to learn PHP for the past few days so I hope this isn't a silly question.
<?php
$var1 = 'lol';
$var2 = '$var1';
$var3 = eval("\$var2;");
print $var3;
?>
Basically I'm trying to eval the variable name from a string and then return the value of that variable. So in this case I'd like $var3 to have the value 'lol'.