My first php not working
<p>Trying to load my first php site in a browser; Firefox displays odd coding tags, IE asks if I want to "open" the file, instead of loading the page. I think I copied a tutorial 100%, so I suppose it really should work.. Is there anything else I need to do to make this work, or may I have some code error?</p>

<p><strong>functions.php</strong></p>

<pre><code>&lt;?php
function displayContent($content) {
    echo implode($content);
}
function displaySidebar($sidebar) {
    echo implode($sidebar);
}
?&gt;
</code></pre>

<p><strong>template.php</strong></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;index&lt;/title&gt;
    &lt;meta name="author" content="SS" /&gt;
    &lt;link href="site.css" rel="stylesheet"type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="container"&gt;
        &lt;div class="header"&gt;        
            header
        &lt;/div&gt;
        &lt;div class="sidebar"&gt;
            &lt;?php displaySidebar($sidebar); ?&gt;
        &lt;/div&gt;
        &lt;div class="content"&gt;
            &lt;?php displayContent($content); ?&gt;
        &lt;/div&gt;
        &lt;div class="footer"&gt;                
            footer
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p><strong>index.php</strong></p>

<pre><code>&lt;?php
//include our functions
require_once ('functions.php');

// declare arrays
$content=array();
$sidebar=array();
//handle page request
$t=$_GET['t'];
if($t == 'about') {
//display about page //can we load a full template?
    $content[]="&lt;h2&gt;about&lt;/h2&gt;";
    $content[]="&lt;p&gt;Content&lt;/p&gt;";
    $sidebar[]="";
} else {
//display the home page
    $content[]="&lt;h2&gt;home page&lt;/h2&gt;";
    $content[]="&lt;p&gt;Content&lt;/p&gt;";
    $sidebar[]="";
}
//Important this is on bottom
//I guess content must be ready on load.
include ('template.php');
?&gt;
</code></pre>

<p><strong>OUTPUT: (Firefox)</strong></p>

<pre><code>about"; $content[]="

Content
"; $sidebar[]=""; } else { //display the home page $content[]="
home page
"; $content[]="

Content
"; $sidebar[]=""; } //Important this is on bottom //I guess content must be ready on load. include ('template.php'); ?&gt;
</code></pre>
