Bootstrap

html表格怎么去除重复,在HTML中重复表格标题

我使用PHP显示MySQL中的大型数据集。如果用户试图打印它,它有大约50页的数据。在HTML中重复表格标题

整个数据是使用显示表中的字段中的数据表和简单的PHP echo-s显示。

我需要的是 - 当用户试图给它或导出打印到PDF的Safari(苹果机),表头应该出现在所有页面。如何才能做到这一点?

谢谢

编辑:我附上了表头,但它不起作用。这是一个简单的HTML页面,没有任何脚本显示数据库中的数据。

代码

echo "

Item InfoLot InfoS.No.Party NameItem No.DateFlowerLot No.Avg Wt.Total WeightDetail Page

";

echo "

";

echo "

".$sno."";

echo "

".$row['partyName']."";

while($row2 = mysqli_fetch_array($itemquery))

{

$itemNo++;

echo "

".$itemNo."";

echo "

".$row2['date']."";

//$flower = $flower + $row2['flower'];

echo "

".$row2['flower']."";

echo "

".$row2['lotno']."";

echo "

".$row2['avgwt']."";

if ($row2['totalWeight'] == 0)

{

echo "

";

}

else{

$totalWt = $totalWt + $row2['totalWeight'];

echo "

".$row2['totalWeight']."";

}

echo "

".$row2['detailPage']."";

echo "

";

}

echo "

Total";

echo "

".$flower."";

echo "

";

echo "

";

echo "

".$totalWt."";

echo "

";

echo "";

echo "

";

}

echo "

";
;