0

我有一个数组,我想循环遍历以在 FPDF 中创建输出,但它没有运行。如果我将值更改为行号,它会起作用。我做错了什么,或者我错过了什么。这是 FPDF 部分。

for(var i=0; $i<$numRows; $i++) {
$pdf->Cell(30,7,'Stop No:',0,0,'L');
$pdf->Cell(12,7,$data[$i]['data']['StopNumber'],0,0,'L');
$pdf->Cell(160,7,$data[$i]['data']['Type'],0,0,'L'); 
$pdf->Ln();
$pdf->Cell(30,7,'Company Name:',0,0,'L');
$pdf->Cell(85,7,$data[$i]['data']['LoName'],0,0,'L');
$pdf->Cell(40,7,'Phone Number:',0,0,'R');
$pdf->Cell(40,7,$data[$i]['data']['LoPhone'],0,0,'L');
$pdf->Ln();
$pdf->Cell(30,7,'',0,0,'L');
$pdf->Cell(85,7,$data[$i]['data']['LoAddress'],0,0,'L');
$pdf->Cell(40,7,'Reference No:',0,0,'R');
$pdf->Cell(40,7,$data[$i]['data']['ReferenceNo'],0,0,'L');
$pdf->Ln();
$pdf->Cell(30,7,' ',0,0,'L');
$pdf->Cell(55,7,$data[$i]['data']['LoCity'],0,0,'L');
$pdf->Cell(10,7,$data[$i]['data']['LoState'],0,0,'L');
$pdf->Cell(20,7,$data[$i]['data']['LoPostalCode'],0,0,'L');
$pdf->Cell(40,7,'Notes:',0,0,'R');
$pdf->Cell(40,7,$data[$i]['data']['LoNotes'],0,1,'L');
$pdf->Cell(195,.5,'','B',1,'L');
4

1 回答 1

1

改变

for(var i=0; $i<$numRows; $i++) {

for($i=0; $i<$numRows; $i++) {
于 2013-04-29T23:43:19.340 回答