I'm trying to pass an include statement through a variable but I'm not having any luck.
Here is an example:
<? $var = "include('somefile.php')"; ?>
and then later on:
<? $var ?>
to actually include the 'somefile.php'
I tried:
<? echo $var ?>
but that just prints out the include statement as a string.
It works if I hard code the include into the script and just place the file name in a path like this:
$var = "somefile.php";
include("$somefile.php");
but then I can only include a file and I need the option to either include a file or just print out html directly.
Any suggestions?
Thanks for the help.
Pahikua