Test.php
table.tpl
hij laat alleen maar zien {3} {BIG_3}
Wat doe ik nou verkeerd
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| <? include("template.php"); $tpl = new FastTemplate("templates"); $tpl->define( array( table => "table.tpl", row => "row.tpl" )); for ($n=1; $n <= 3; $n++) { $Number = $n; $BigNum = $n*10; $tpl->assign( array( NUMBER => $Number, BIG_NUMBER => $BigNum )); $tpl->define_dynamic( "row" , "table" ); } $tpl->parse(INDEX, array("table")); $tpl->FastPrint(); exit; ?> |
table.tpl
code:
1
2
3
4
5
6
7
8
| <!-- NAME: table.tpl -->
<!-- BEGIN DYNAMIC BLOCK: row -->
<tr>
<td>{NUMBER}</td>
<td>{BIG_NUMBER}</td>
</tr>
<!-- END DYNAMIC BLOCK: row -->
<!-- END: table.tpl --> |
hij laat alleen maar zien {3} {BIG_3}
Wat doe ik nou verkeerd