PHP Global Variables across .php files <p>I have two files that get loaded on a page (body.php and footer.php).</p> <p>In body I have:</p> <pre><code>&lt;?php global $pageName = "foo";?&gt; </code></pre> <p>In footer I have:</p> <pre><code>&lt;?php echo $pageName;?&gt; </code></pre> <p>However, it echo's out nothing. Am I missing something?</p>