How can I get the contents of a PHP file (which also contains HTML) into a variable, and then echo them at a later time inside another PHP file? I also need the contents to execute the PHP in it properly. I tried something like the following, but its just giving me a string of all the contents on the page.
$contents = file_get_contents("myfile");
echo $contents;
Use output buffering and include the file.
Then, at a later time: