PHP Code:
Now our navigational bar is declared as the variable $navigation in global.php.
So now on index.php and links.php (all for example) we have:
PHP Code:
And $navigation is read in index.php and links.php from calling "require_once "global.php" ".
You can do page headers, navigation, footers and anything else in this fashion, so you don't have to keep editing it in each file. That's the way I do it, at least. And say, I wanted to make a new page called "howtos.php" and add a link to the navigation. Instead of editing index.php and links.php's navigation bar, I can edit the variable in global.php and it changes on both files, with only one edit
Dr Small