Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
Classes of Dmitry Levashov | > | YaTemplate | > | example1.php | > | Download | ||
|
Download |
<?php include "YaTemplate_class.php"; $T = new YaTemplate(); $T->SetFile(array(main=>"main.html", tb=>"table.html")); $T->SetVar(array(title=>"Example 1", tb_header=>"One simple example :) ")); $T->SetBlock("tb", "row"); for ($i=1; $i<10; $i++) { $T->SetVar("text", "Row $i"); $T->Parse("row", "row", true); } $T->Parse("CONTENT", "tb"); $T->Parse("out", "main"); $T->PrintOut(); ?> |