'how to add array into table in FPDF
I want to pass my array into table using FPDF. I want to do like the image given
$arrayA = [1,3,5,7,9,11,13,15,17,19];
$arrayB = [2,4,6,8,10,12,14,16,18,20];
but the result I get now is like this:

here is my code:
$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(0,0,0);
$pdf->SetDrawColor(0,0,0);
$pdf->SetLineWidth(.3);
$pdf->SetXY(25, 115);
$pdf->SetX(15);
$i = 0;
$space = 5;
while ($i < count($arrayA))
{
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(90, 8, $arrayA, "LBR", 0, 'L');
$i++;
}
$j = 0;
while ($j < count($arrayB))
{
$pdf->SetFont('Arial', '', 10)
$pdf->Cell(90, 8, $arrayB);
$j++;
}
$pdf->Ln();
Does anyone know how to solve it? Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

