Trivialbeispiel:
header1.php
header2.php
content1.php
content2.php
index.php
header1.php
PHP-Code:
<h1>Meine Überschrift 1</h1>
PHP-Code:
<h1>Meine Überschrift 2</h1>
PHP-Code:
Inhalt 1<br>
<a href="index.php?page=2">weiter</a>
PHP-Code:
Inhalt 2<br>
<a href="index.php?page=1">zurück</a>
PHP-Code:
<?php
switch ((int) $_GET['page'])
{
case 1:
?>
<div id="header"><?php include ('header1.php'); ?></div>
<div id="content"><?php include ('content1.php'); ?></div>
<?php
break;
case 2:
?>
<div id="header"><?php include ('header2.php'); ?></div>
<div id="content"><?php include ('content2.php'); ?></div>
<?php
break;
}


Kommentar