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

Php FPDF在一个单元格中设置2个连续值,php,fpdf,Php,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 . ' - ' . $add

我只需要了解如何在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);