Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在一段时间内跳过一行_Php_Mysql_Fpdf - Fatal编程技术网

Php 如何在一段时间内跳过一行

Php 如何在一段时间内跳过一行,php,mysql,fpdf,Php,Mysql,Fpdf,我正在尝试使用函数FPDF将php转换为pdf,但我在数据库中进行了选择,我希望将此选择的所有元素都转换为pdf: $query="select organisme,id from client"; $resultats=$db->query($query); $pdf=new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFillColor(232,232,232); $pdf->SetFont('

我正在尝试使用函数FPDF将php转换为pdf,但我在数据库中进行了选择,我希望将此选择的所有元素都转换为pdf:

$query="select organisme,id from client";
$resultats=$db->query($query);
$pdf=new FPDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFillColor(232,232,232);
$pdf->SetFont('Arial','B',12);
$pdf->Cell(20,6,'ID',1,0,'C',100);
$pdf->Cell(70,6,'mes organismes',1,0,'C',1);
$pdf->SetFont('Arial','',10);

while ($row = $resultats->fetch(PDO::FETCH_ASSOC))
{
  $pdf->Cell(20,6,utf8_decode($row['id']),1,0,'C',1); 
  $pdf->Cell(70,6,$row['organisme'],1,0,'C',1);
}

$pdf->Output();
?>
但问题是我拿到了身份证,但我有个问题:

我想知道我该怎么做才能跳进所有新的身份证和组织我

谢谢

FPDF的
Ln()
函数执行换行操作

$pdf->Ln();
将这一行添加到
$pdf->Cell()
函数调用下方,包括标题行和
while
循环内部