'php script in stream from php file_get_contents ends unexpectedly after greater than sign [duplicate]

<?php 
    if ($Mobiel == "ja") {
    print "<font size='3vw'>";}
?>

This code works fine in a php-page (page.php) I use.
The output is:

<font size='3vw'>

I want part of this page echoed in another php-page. Therefore I use file_get_contents() and echo the result.

$Content = file_get_contents("page.php");
//remove parts of the content I don't need 
echo $Content;

This works fine until the first mentioned code executes: it stops at the first > sign.
The remaining characters are printed as html text. In this case the output is:

";} ?>

I know that the script starts executing, because its behaviour does not occur when the condition of the if statement is false.
All my pages have the extention .php and all my scripts are marked with <?php and ?>
Why does the behaviour of the script change?

Remark: I tried to use &gt; in stead of >. This works but not everywhere.
Example: print "some text<br>some other text" displays nothing anymore when > is replaced by &gt;
And print nl2br("some text \n some other text";) neither



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source