|
PHP
|
HTML
|
Result
|
<?php
$row = [1,2,3]; $column = [1,2,3,4,5];
?>
|
<table border='1'> {row} <tr> {column} <td>{$row | * 10 | + $column}</td> {/column} </tr> {/row} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
<?php
$short = [ [ 11,12,13,14,15 ], [ 21,22,23,24,25 ], [ 31,32,33,34,35 ] ];
?>
|
<table border='1'> {short} <tr> {short} <td>{$short}</td> {/short} </tr> {/short} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
<?php
for ($row = 1; $row <= 3; $row++) for ($col = 1; $col <= 5; $col++) $rows [$row] ['cols'] [$col] = TRUE;
?>
|
<table border='1'> {rows} <tr> {cols} <td>{echo (&rows:key*10) + &cols:key}</td> {/cols} </tr> {/rows} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
<table border='1'> {sequence '10..30', increment=10, name='row'} <tr> {sequence '1..5', name='column'} <td>{$row | + $column}</td> {/sequence} </tr> {/sequence} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
<table border='1'> {sequence 3} <tr> {sequence 5} <td>{echo ($-2 * 10) + $-1}</td> {/sequence} </tr> {/sequence} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
<table border='1'> {set $row = 10} {while $row <= 30} <tr> {set $column = 1} {while $column <= 5} <td>{echo $row + $column}</td> {increment $column} {/while} </tr> {set $row = $row + 10} {/while} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
{data 'row' } (1,2,3) {/data} {data 'column'} (1,2,3,4,5) {/data}
<table border='1'> {row} <tr> {column} <td>{$row | * 10 | + $column}</td> {/column} </tr> {/row} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
{data 'myJson'} [ { "column": [ 11, 12, 13, 14, 15 ] }, { "column": [ 21, 22, 23, 24, 25 ] }, { "column": [ 31, 32, 33, 34, 35 ] } ] {/data}
{pad data='myJson'} <table border='1'> @start@ <tr> {column} <td>{$column}</td> {/column} </tr> @end@ </table> {/pad}
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
{data 'myCsv'} AA,BB,CC,DD,EE 11,12,13,14,15 21,22,23,24,25 31,32,33,34,35 {/data}
<table border='1'> {myCsv} <tr> {fields} <td>{$value}</td> {/fields} </tr> {/myCsv} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
{data 'myYaml', 'level_demo.yaml'}
<table border='1'> {myYaml} <tr> {column} <td>{$column}</td> {/column} </tr> {/myYaml} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|
| |
{data 'myXml', 'level_demo.xml'}
<table border='1'> {myXml} <tr> {column} <td>{$column}</td> {/column} </tr> {/myXml} </table>
|
| 11 |
12 |
13 |
14 |
15 |
| 21 |
22 |
23 |
24 |
25 |
| 31 |
32 |
33 |
34 |
35 |
|