3
我寫了下面的代碼創建一個表,多單元如何創建多節表FPDF
$this->Cell(25, 25, "SR.No.", 'LTRB', 0, 'L', true);
$this->Cell(60, 25, "CHALLAN", 'LTRB', 0, 'L', true);
$this->Cell(300, 25, "JOB NAME", 'LTRB', 0, 'L', true);
$this->Cell(60, 25, "QTY.", 'LTRB', 0, 'L', true);
$this->Cell(60, 25, "RATE", 'LTRB', 0, 'L', true);
$this->Cell(90, 25, "AMOUNT", 'LTRB', 1, 'C', true);
$i=1;
while($row = mysql_fetch_array($result))
{
$x = $this->x;
$y = $this->y;
$push_right = 0;
$this->MultiCell($w = 25,25,$i,1,'C',0);
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->MultiCell($w = 60,25,$row[3],1,'C',0);
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->MultiCell($w = 300,25,$row[2],1,'L',0);
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->MultiCell($w = 60,25,$row[4],1,'L',0);
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->MultiCell($w = 60,25,$row[5],1,'L',0);
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->MultiCell($w=90,25,$row[6],1,'C',1);
$this->Ln();
$i++;
}
卜我想從兩個行刪除空間不對齊並且每列的相同高度嘗試了很多次,但沒有解決。