Code

Advanced PHP Template Preprocessor

Advanced PHP Template Preprocessor

(13) 4.23 stars
74 Sales

The Advanced PHP Template Preprocessor You’ve Been Looking For!

Advanced PHP Template Preprocessor is similar to Smarty or Dwoo, however it offers a number of improvements.

Introduction

Put simply, Advanced PHP Template Preprocessor can replace tags with values set in PHP, and it also lets you create advanced templates with an awesome syntax language!

Example

 echo Element("template.html", Array( "something" => "something" ));

Features

Optionals/Defaults

You can specify the defaults for a variable, which are used when the value isn’t specified by the PHP script.

Conditionals

“if” statements.

Iteration

You can parse an Array to the template, and make it iterate through it.

Arrays

You can use arrays, infinitely, like so:

“{something[something]}”

PHP Variables

If you enable this, you can access global PHP variables by using “{$something}”.

Speed

This script is optimized for performance. An average template shouldn’t take more than 0.001 seconds to process. That’s one millisecond! That time generally increases (slightly) as more tags and layers are added, but you will probably never see it go over 0.005 seconds (5 milliseconds).

Infinite recursion

You can add as many layers of tags as you want.

For example, you could use…

“{test={test={test={test={test={test={test={test={test={test={test}}}}}}}}}}”

... And it would still be processed accordingly. There is no limit to recursion.

by
by
by
by
by
by