How can I get expected output from example below?
Note: I'm using $content = file_get_contents('content.php');
to use content where and when possible so it is not a direct output on screen. include()
breaks the pages.
content.php
<p>Hello <?php echo 'World!'; ?></p>
reader.php
<b>Message from another file:</b> <?php echo file_get_contents('content.php'); ?>
Output of code above is:
Message from another file: Hello <?php echo 'World!'; ?>
Instead of (expected):
Message from another file: Hello World!