Hi there.
Want to read a separate PHP page (with PHP tags) into a variable as an HTML file in the current PHP page, using the variables in the current page.
suppose the page I wanted to read (output.php) was this:
<body>
First Name: <?php echo $FirstName;?> <br>
Last Name: <?php echo $LastName;?>
</body>
Now I want a funciont that reads that page into a variable. I'm going to call that function real_good_idea() for this demo. Here is the way I'd want the function to work:
$FirstName = 'John';
$LastName = 'Smith';
$myPage = real_good_idea("output.php");
echo $myPage;
And of course if everything worked OK, you'd get this as the output:
<body>
First Name: John <br>
Last Name: Smith
</body>
BTW I want to do this so I can use a page as a template for an HTML Email, among other things.
Sam Fullman
Compass Point Media.