Let's see how to calculate the numbers in this example? These are the numbers in red letters, three in each row, and all the numbers in the even row should be calculated in mathematics? The remainder is the number of the column. how can we express the even rows of the red letter? Math ------ solution ------------------ smarty to see how the numbers in the preceding figure can be calculated?
These are the numbers in red letters, three in each row, and all the numbers in the even row should be calculated in mathematics?
The remainder is the number of the column. how can we express the even rows of the red letter?
Mathematics
------ Solution --------------------
Smarty ??
Doesn't he have a cycle control variable? Why not!
Test. php
Include_once ("smarty_inc.php ");
$ Arr = array ('A', 'B', 'C', 'D', 'e', 'F ');
$ Smarty-> assign ('arr', $ arr );
$ Smarty-> display ("test. tpl ");
Test. tpl
{Section name = a loop = $ arr}
{$ Arr [a]}
|
{/Section}