PHP Classes

File: Description.txt

Recommend this page to a friend!
  Classes of Herman Veluwenkamp   Template   Description.txt   Download  
File: Description.txt
Role: ???
Content type: text/plain
Description: Description
Class: Template
Generates HTML using templates.
Author: By
Last change:
Date: 24 years ago
Size: 610 bytes
 

Contents

Class file image Download
The template file (path given by $file_name) contains the pattern (* <var> [<format>] *) for each area to be substituted. Any section in REPEAT tags will be iterated for each row in the $data variable. The <format> area defines how to display the data, by using either sprintf or number_format (or nothing if not defined). For example (* something %03.2f *) where something = 12.334 would be displayed as 012.33. and (* data #.2 *) would be displayed as 12.33. The patterns (* ~ *) and (* + *) are special cases. The former is a toggle, and the latter is a counter. Refer to test.php to see it in action.