Skip to content

Commit

Permalink
setVarArray recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr-ru committed Apr 5, 2017
1 parent 1ec71e8 commit b74f1da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/recursion.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,12 @@
[block-2]
<!-- RECURSION block2 -->
<!-- END block2 -->

<hr>

<!-- BEGIN block3 -->
[block-3, level {{LEVEL}}]
<!-- RECURSION block3 -->
<!-- END block3 -->
</body>
</html>
13 changes: 13 additions & 0 deletions tests/recursion.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@

$to->setBlock('block2')->setBlock('block2')->setBlock('block2');

$a = array(
'block3' => array(
'LEVEL' => 1,
'block3' => array(
'LEVEL' => 2,
'block3' => array(
'LEVEL' => 3,
),
),
),
);
$to->setVarArray($a);

$to->showOutput();

function recursion(&$tmpl, $level = 0)
Expand Down

0 comments on commit b74f1da

Please sign in to comment.