PHP Classes

File: demo/templates/home.tpl.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   H2OTpl   demo/templates/home.tpl.php   Download  
File: demo/templates/home.tpl.php
Role: Auxiliary script
Content type: text/plain
Description: Example script
Class: H2OTpl
Process and output PHP template scripts
Author: By
Last change: Update of demo/templates/home.tpl.php
Date: 1 month ago
Size: 752 bytes


Class file image Download
<? include('inc/header.tpl.php') ?>

<h1><?= strtoupper($this->sH1) ?></h1>
<p><strong><?= $this->sDesc ?></strong></p>

<? if(is_array($this->aBooks)): ?>

    <!-- A table of some books. -->

        <? foreach($this->aBooks as $sKey => $sVal): ?>
                <td><?= $this->escape($sVal['author']) ?></td>
                <td><?= $this->escape($sVal['title']) ?></td>
        <? endforeach ?>


    <? else: ?>

        <p>There are no books to display.</p>

    <? endif ?>

    <div id="html5" title="Validated for HTML5"></div>

<?php include('inc/footer.tpl.php') ?>