I recently started to use FPDF as a solution to export some data from sql to pdf. This is my attempt to display a while loop. The only problem is with the line break at the end.
$sql = "SELECT * FROM table ORDER BY ID ASC";
$items = mysql_query($sql);
while ($get = mysql_fetch_array($items)):
$pdf->SetXY (10,130);
$pdf->SetFontSize(12);
$txt="<b>Item 1</b>: $get[NAME]";
$pdf->WriteHTML(utf8_decode($txt));
$pdf->SetXY (10,135);
$pdf->SetFontSize(12);
$txt="<b>Item 2</b>: $get[CITY]";
$pdf->WriteHTML(utf8_decode($txt));
$pdf->Ln(30);
endwhile;
Any solution to separate the result with some space?