如何使用PHP使用fpdf生成这样的表?

如何使用PHP使用fpdf生成这样的表?,php,fpdf,tabular,Php,Fpdf,Tabular,如何使用PHP使用FPDF生成这样的表 我似乎不知道如何使用$this->Cell来实现这一点 好的。。让我们试试看。只是一个例子。。一个主意。好吗 $pdf->SetFillColor(255,0,0); $pdf->SetTextColor(255); $pdf->SetDrawColor(128,0,0); $pdf->SetLineWidth(.3); // Title row $pdf->SetFont('', 'B'); $pdf->Cell(1

如何使用PHP使用FPDF生成这样的表

我似乎不知道如何使用$this->Cell来实现这一点


好的。。让我们试试看。只是一个例子。。一个主意。好吗

$pdf->SetFillColor(255,0,0);
$pdf->SetTextColor(255);
$pdf->SetDrawColor(128,0,0);
$pdf->SetLineWidth(.3);

// Title row
$pdf->SetFont('', 'B');
$pdf->Cell(100, 8, "LEARNING POTENTIAL", 1, 0, 'L', true);
$pdf->SetFont('', '');
$pdf->Cell(20, 8, "Score", 1, 0, 'C', true);
$pdf->Cell(20, 8, "Results", 1, 0, 'C', true);
$pdf->>Ln();

// Data rows

// (loop) foreach($data as $row) {

    $pdf->SetFont('', 'B');
    $pdf->Cell(100, 8, "Reasoning", "LTR", 0, 'L');
    $pdf->Cell(20, 8, "", "LTR");
    $pdf->Cell(20, 8, "", "LTR");
    $pdf->>Ln();

    $pdf->SetFont('', 'B');
    $pdf->Cell(100, 8, "The ability to interpret information and", "LR", 0, 'L');
    $pdf->SetFont('', '');
    $pdf->Cell(20, 8, "6", "LR");
    $pdf->Cell(20, 8, "Effective", "LR");
    $pdf->>Ln();

    $pdf->SetFont('', 'B');
    $pdf->Cell(100, 8, "drawing accurate conclusions", "LBR", 0, 'L');
    $pdf->Cell(20, 8, "", "LBR");
    $pdf->Cell(20, 8, "", "LBR");
    $pdf->>Ln();

// (end loop)

我将每个数据行分为3行。

我认为这里的人不会为您编写代码。fpdf有一个非常好的文档,您应该尝试一下,然后如果您遇到问题,您可以在这里询问。您可以查看此页面(或www.google.com并搜索“fpdf中的表格”),我不需要填写代码。只是基本的想法或小样本。我试过了,但没有解决这个问题@MasidDiqui无法使用方法Cell()执行此操作,因为只能提供文本。医生:谢谢,杰瑞。这不仅仅是一个想法。