Question: how to export data to pdf file in php?
Answer: php require('fpdf/fpdf. php'); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',12); foreach($result as $row) { $pdf->SetFont('Arial','',12); $pdf->Ln(); foreach($row as $column) $pdf->Cell(90,12,$column,1); } $pdf->Output(); ?>