Home > Backend Development > PHP Tutorial > php fpdf 如何输出一个表头

php fpdf 如何输出一个表头

WBOY
Release: 2016-06-13 11:38:10
Original
1115 people have browsed it

php fpdf 怎么输出一个表头
我这边需要输出一个table,但是表头里的字可能会比较多,页面的宽度是固定的。所以肯定要用到MultiCell,求各位 怎么用 ,其实我用了,但是乱掉了。。。
我的代码:
$pdf->Cell(30,6,'field 1','L,T,B',0,'L',true);
$pdf->Cell(40,6,'field 2','T,B',0,'L',true);
foreach($fields as $key=>$val){
// $pdf->Cell($tax_width, 20, $book, 0, 'L'); 
   $pdf->MultiCell($tax_width,6,$key,'T,B',0,'C',true);
}

用cell,有可能字会覆盖,用MultiCell就成不了一个表头了,求解。。。

Related labels:
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