Hello everybody i am new fpdf. I have multiple array values and create a table.
$array1=[1,2,3];
$array2=['apple', "ball", "cat"];
I want to create a table using this values
Numbers Animals
1 Apple
2 Ball
3 Cat
I have tried this way but all values are printing one by one
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',10);
for ($i=0; $i < count($array1); $i++) {
[$pdf->MultiCell(30,12,$array1[$i],1), $pdf->MultiCell(30,12,$array2[$i],1)];
}
$pdf->Output();
Can anyone suggestion me how this problem. Thanks in advance.