Question: So i am on my first html course and i'm trying to just build a very simple page where the header and footer can appear on 3 different pages without duplicating the code, is there a way to do this? if it is, is it possible if someone can show me a quick example?

//Pontus

Answer: 
Use SSI, here is a link about them: <http://en.wikipedia.org/wiki/Server_Side_Includes>
Another possibility is to use PHP’s [`include`](http://php.net/manual/en/function.include.php) function. You may also use any variables in the included file that are defined at the line on which the include occurs which is helpful when the included file contains data that changes (e.g. the page title).

Example
-------

**header.php**

```
<!doctype html>
<html>
  <head>
    <title><?= $title ?></title>
    <link rel="stylesheet" href="…" />
  </head>
  <body>

```

**footer.php**

```
  </body>
</html>

```

**index.php**

```
<?php
  $title = 'Home';
  include 'header.php';
?>
  Your content here!
<?php
  include 'footer.php';
?>

```