Hi!
I have a problem: I have a variable containting HTML & PHP Code, that was read from a file. I want to execute the code in the variable and return the output into another variable:
e.g.:
$code = "<body><?php echo \"hello world\"; ?></body>";
the problem is that the eval() function will immediatly output the parsed code, it does not return it.
Is there a solution? I also tried to read the external file into a variable using something like that:
$AlreadyParsedCode = include("file.inc");
That doesn't work either because also include does not return anything (not correct, it returns the file size), but not the parsed code.
What can I do insted?
Thanks,
Matthias