我有一个MySQL代码,人们列出了大量的信息,这可以分为两列。 我已将这些人分组到部门中,并且每个页面上都有一个部门标题。
当部门不适合同一列时,我想打破专栏并再次从顶部开始。
有没有人遇到过同样的问题? 任何帮助,将不胜感激:)
谢谢
I have a MySQL code which people list up x amount of information and this goes in two columns. I have grouped these people in departments and there is a department header for each on the page.
I would like to break the column and start from the top again when the department would not fit in the same column.
Have anyone experienced the same issue? Any help would be appreciated:)
thanks
最满意答案
我刚刚遇到同样的问题,我通过查看页面中的当前位置来处理它。 如果我知道的内容页面中的位置太低(因此会流向下一列),我会在输出之前选择下一列。 以下是我的代码示例:
if ($tcpdf->GetY() > 188) $tcpdf->selectColumn($tcpdf->getColumn() + 1); $tcpdf->writeHTMLCell(120, 3, $tcpdf->GetX(), $tcpdf->GetY(), $html, '', 1);I just ran in to the same issue, and I dealt with it by checking my current position in the page. If the position is too low in the page for the content that I know will be there (and thus flow to the next column) I select the next column before outputting. Here is a sample of my code:
if ($tcpdf->GetY() > 188) $tcpdf->selectColumn($tcpdf->getColumn() + 1); $tcpdf->writeHTMLCell(120, 3, $tcpdf->GetX(), $tcpdf->GetY(), $html, '', 1);更多推荐
发布评论