This is something i just spent about an hour on, before the simple solution finally hit me!

I have a page which looks like so:

PHP Code:
<?php include("header.php"); ?>

<div class="content">
Content goes here
</div>

<?php include("footer.php"); ?>
Now in the footer part, i would like to change content within the footer part. In this case i will be calling a different menu set.

To do this i tried this:


PHP Code:
<?php include("header.php"); ?>

<div class="content">
Content goes here
</div>

<?php include("footer.php"); $menu "home"?>
I added an IF set into the footer.php, and to my despair it didnt work. The data wasnt being passed.

After an hour or so i finally found out how to make it pass data to the included file. The solution is so simple i felt ashamed...

Just swap the include() and the variable!!! so now it looks like this:

PHP Code:
<?php include("header.php"); ?>

<div class="content">
Content goes here
</div>

<?php $menu "home"; include("footer.php"); ?>
Hope this helped in a minor way?