亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

html_table function

html_table function:

#Custom function html_table fills the data in the array into the HTML table. The cols attribute determines how many columns the table has.

table_attr, tr_attr and td_attr attributes determine some additional attributes of the tr and td tags in the table.

If tr_attr and td_attr attribute values ??are arrays, and the values ??will be used in turn.

If the trailpad attribute is specified, some data will be appended to the last row at the end of the table.

eg:

index.php:
require('Smarty.class.php');
$smarty = new Smarty ;
$smarty->assign('data',array(1,2,3,4,5,6,7,8,9));
$smarty->assign('tr' ,array('bgcolor="skyblue"','bgcolor="#0f0"'));
$smarty->display('index.tpl');

index. tpl:
{html_table loop=$data}
{html_table loop=$data cols=4 table_attr='border="0"'}
{html_table loop=$data cols=4 tr_attr =$tr}

Output:

:微信圖片_20180313123801.png

Continuing Learning
||
<?php echo "html_table函數(shù)";
submitReset Code