I would like to call a PHP page from a PHP page, and return the output of the page I called as a single variable.
require would not suit my purposes as I need the output stored as a variable for later use, rather than outputting it immediately.
IE:
page1.php
<?php
echo 'Hello World!<br>';
$output = call_page('page2.php');
echo 'Go for it!<br>';
echo $output;
?>
page2.php
<?php
echo "Is this real life?<br>";
?>
Would output:
Hello World!
Go for it!
Is this real life?