modular.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Modular Web Sites</title>
<link rel="stylesheet" href="style.css" media="all">
</head>
<body id="modular">
<div id="wrapper">
<?php include_once("header.php"); ?>
<section>
<?php include_once("navigation.php"); ?>
<article>
<h2>Modular Web Development</h2>
<p>One way to think about a web site is as a collection of pages, which is what we have done up to now. CSS helps us reduce redundancy by centralizing the instructions of what each page is to look like. A centralized style sheet saves us a lot of time. PHP allows us to do the same for the different parts of the web site that stay the same from page to page.
<p>A web page is composed up of modules that remain pretty consistent throughout the site, like the header, navigation, asides, footer, etc. PHP allows us to separate these modules out as centralized external files. That means we will be creating modules like footer, header and navigation, and then use PHP to put them all together and serve them up as finished HTML pages.
</article>
</section>
<?php include_once("footer.php"); ?>
</div>
</body>
</html>
navigation.php
<!DOCTYPE html>
<nav>
<ul>
<li><a class="whatIs" href="whatIs.php">What Is PHP?</a></li>
<li><a class="modular" href="modular.php">Modular Pages</a></li>
<li><a class="basics" href="basics.php">PHP Basics</a></li>
<li><ul>
<li><a class="page" href="page.php">Writing PHP</a></li>
<li><a class="variables" href="variables.php">Variables</a></li>
<li><a class="functions" href="functions.php">Functions</a></li>
<li><a class="operators" href="operators.php">Operators</a></li>
</ul></li>
<li><a class="includes" href="include.php">Includes</a></li>
<li><a class="more" href="more.php">More</a>
<li><a class="example" href="example.php">Example Code</a></li>
</ul>
</nav>
header.php
<!DOCTYPE html>
<header>
<h1>Modular Websites using PHP</h1>
</header>
footer.php
<!DOCTYPE html>
<footer>
<a href="http://circularcreation.com/clients/parsons_11-fall/">Web Design 1</a>, Parsons, the New School of Design. Additional resources can be found at <a href="http://php.net/">PHP.net</a>, with tutorials and the manual at an <a href="http://php.net/manual/en/intro.pdo.php">Introduction to PHP</a>.
</footer>