Is there any other way to do this with out using the ugly eval function?
Thanks,
Ben
Code:
<?
$text1 = "this is text1";
$text2 = "welcome to text two";
$index = 2;
$code = "print(\"\$text$index\");";
print("code = $code<br>\n");
eval($code);
?>
Thanks,
Ben