FPDF在一个单元格中设置两个连续值



我只需要了解如何在FPDF中设置MySQL数据库中的2个值。这些值将是连续的,中间有一个"短划线"。这是我想做的一个例子

$pdf->Cell(110, 7,$address1 ' - ', $address2);

您使用的是逗号,但应该使用句点'.'。FPF将这些视为用逗号分隔的不同参数。

// this will work (note the dots instead of the comma)
$pdf->Cell(110, 7,$address1 . ' - ' . $address2);
// I prefer this: it is easier to read
$fullAddress = $address1 . ' - ' . $address2;
$pdf->Cell(110, 7,$fullAddress);

最新更新