PHP putting "if" in header and "else" in footer
<p>I am a programmer and I am picking up PHP, I cannot seem to search for this so I hope this is not a duplicate. Currently this is giving me an error at line 4 on header.php which says:
unexpected $end </p>

<p>I know that it is complaining about the syntax but I don't fully understand how the files are parsed processed and get executed at runtime (hence creating this error). I would be grateful if somebody can fill me in if I have missed any core concept in PHP, thanks.</p>

<p>header.php</p>

<pre><code>&lt;?php
if(true){
    echo "Helloworld";
?&gt;
</code></pre>

<p>body.php</p>

<pre><code>&lt;?php
include('header.php');

echo "The great brown fox jumps over the lazy dog.";

include('footer.php');
?&gt;
</code></pre>

<p>footer.php</p>

<pre><code>&lt;?php
}else{
    echo "bye bye";
}
?&gt;
</code></pre>
