X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/d2c79885c79f02502a531c00d0d437c96e7c3a4d..715ddc41f45dcf4d64348fef69844618ad1abb3d:/examples/hit.php diff --git a/examples/hit.php b/examples/hit.php index 9dae06d..0f7ce47 100644 --- a/examples/hit.php +++ b/examples/hit.php @@ -37,14 +37,18 @@ require_once 'HTML/Template/HIT.php'; $hit =& new HTML_Template_HIT('hooks'); -$rows = ''; for ($i = 0; $i < 20; $i++) { - $cells = ''; for ($j = 0; $j < 20; $j++) { - $cells .= $hit->parse('cell', array('CELL' => "$i,$j")); + $hit->parseBuffered('cell', 'CELL', "$i,$j"); } - $rows .= $hit->parse('row', array('ROW' => $cells, 'CACA' => 'fea')); + $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell')); } -echo $hit->parse('body', array('ROWS' => $rows, 'TITLE' => 'HOLA MUNDO!!!')); +echo $hit->parse( + 'body', + array( + 'ROWS' => $hit->popBuffer('row'), + 'TITLE' => 'HOLA MUNDO!!!', + ) +); ?>