tcpdf を使用して動的テーブルを作成していますが、テーブルが正しく取得されません。各行の最初のセルのみを取得しました。他のセルは表示されず、テーブルの境界線も消えます。どうすれば修正できますか?
$pdf->SetFont('helvetica', 'B', 20);
$pdf->AddPage();
$pdf->Write(0, 'Example of HTML tables', '', 0, 'L', true, 0, false, false, 0);
$pdf->SetFont('helvetica', '', 8);
$pdf->setPageMark();
$pdfArray = array();
$str2 = "<table cellspacing='1' cellpadding='1' border='1'><tr><td colspan='6'>".$br1." ". $sem1."</td></tr>";
$i=1;
$str2 .="<tr>";
while($i<=42)
{
$str2 .="<td>"." ".$i."</td>";
if($i%6==0)
$str2 .="</tr><tr>";
$i++;
}
$str2 .= "</tr></table>";
array_push($pdfArray, $str2);
$table = implode(" ",$pdfArray);
$tbl100 = <<<EOD
$table
EOD;
$pdf->writeHTML($str2, true, false, false, false, '');
次のような出力が得られます
1
7
13
19
25
31
しかし、次のような出力が必要です
1 2 3 4 5 6
7 8 9 10 11 12
13 14 ...
25 26 ...
31 32 ...