Home > Backend Development > PHP Tutorial > 动态生成报表

动态生成报表

WBOY
Release: 2016-06-13 10:45:13
Original
987 people have browsed it

动态生成表格
动态生成一个表格,其中表格的某一列是一个函数的返回结果,表格行数不确定。如果用for循环来实现的话,每次都要调用函数,会很费时间,有什么好的办法吗? 可能描述不太清楚

------解决方案--------------------
函數的調用次數好像是省不了的吧,先算出來,放一數組裡,再拼接成表格,數量太多就分頁,一次只算本頁的幾個就行了
------解决方案--------------------
数据与视图层解耦。慢慢折腾~
------解决方案--------------------
函数调用,如果不确定就用分页显示

Related labels:
for
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template