CI提供了一个表格类 可以方便的生成表格
$template = array('table_open' => '<table class = "table">');
$this->table->set_template($template);
echo $this->table->generate($table);
以上代码可以输出table这个二维数组表格
其中表头加入了样式
只要引用bootstrap就可看到最基础的bootstrap表格了
本文介绍如何使用CI框架提供的表格类快速生成带有样式的表格。通过设置模板,可以轻松地为表格添加Bootstrap样式,只需几行代码即可实现。
CI提供了一个表格类 可以方便的生成表格
$template = array('table_open' => '<table class = "table">');
$this->table->set_template($template);
echo $this->table->generate($table);
以上代码可以输出table这个二维数组表格
其中表头加入了样式
只要引用bootstrap就可看到最基础的bootstrap表格了
1257

被折叠的 条评论
为什么被折叠?