我一直在寻找解决我问题的方法。香港专业教育学院在这里看到了一些答案,但不会成功。我的行是仅混合多单元格和单元格
foreach($data['subject'] as $r){
$pdf->SetFont('times','',8);
$pdf->Cell(10,5, $x,1,0,'L');
$pdf->Cell(30,5, $r->code,1,0,'L');//SHOULD BE MULTICELL
$pdf->Cell(95.8,5,$r->subdesc,1);//SHOULD BE MULTICELL
$pdf->Cell(10,5, $r->units,1,0,'C');
$pdf->Cell(10,5, $r->loadunits,1,0,'C');
$pdf->Cell(10,5, $r->tfunits,1,0,'C');
$pdf->Cell(10,5, $r->lecunits,1,0,'C');
$pdf->Cell(10,5, $r->labunits,1,0,'C');
$pdf->Cell(10,5, $r->hours,1,0,'C');
$pdf->Ln();
$x++;
}
ive尝试使用下面的代码,但未输出所需的布局。
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->MultiCell(30, 5, $r->code, 1, 1);
$pdf->SetXY($x + 30, $y);
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->MultiCell(95.8, 5, $r->subdesc, 1);
$pdf->SetXY($x + 30, $y);
$pdf->Cell(10, 5, $r->units, 1);