I'm trying make a table using PHPTAL and this table should be set with
dynamic numbers of cols or rows.
To do it in PHP only, i use an increment counter, something like:

$i = 0;
loop {
echo '<td>';
if ($i == $numberOfCols) {
echo "</tr><td>"; //closes a table row and create a new column
$i = 0; //redo the increment counter

So, i am trying to do the same thing using PHPTAL but it dont works fine
with increment counters.
My initial code is::

<tal:block repeat="item test" define="i php:0;">
<td tal:content="php: i++">xxx</td>
<tal:block condition="php:(i==numberOfCols)" define="i php:1;">

Further on PHPTAL dont accept the TR tag as closure.
Somebody can help me?


Daniel Lima
Web Developer
Cilens Software
Marie von 
- "Even a stopped clock is right twice a day."
PHPTAL mailing list

Reply via email to