javascriptcursus/inhoudsopgave.php

<?php // Includes: require_once 'php/page.php'; // Page: $page = new page("Inhoudsopgave"); $page->addContent('<p>De inhoudsopgave van deze site.</p>'); $page->addContent('<ol class="no-list-style">'); for($i = 1; $i < count($GLOBALS['chapter_titles']); ++$i) { $chapter = $GLOBALS['chapter_titles'][$i]; $page->addContent("<li><b><a href=\"hoofdstuk_$i.php\">H$i - $chapter[0]</a></b>"); if(count($chapter) > 1) { $page->addContent('<ol class="no-list-style">'); for($j = 1; $j<count($chapter); ++$j) $page->addContent("<li id=\"h$i.$j\"><a href=\"hoofdstuk_$i.php#H$i.$j\">H$i.$j - $chapter[$j]</a></li>"); $page->addContent('</ol>'); } $page->addContent('</li>'); } $page->addContent('</ol>'); $page->printAll(); ?>

Resultaat

Made by Thijs Aarnoudse