1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
$j=0
while ($donnees3 = mysql_fetch_array($retour3))
{
$j++;
if(($j>0) && ($j<21))
{
$this->Cell($w[0],5,$reference,1,0,'L');
$this->Cell($w[1],5,$libelle_produit,1,0,'L');
$this->Cell($w[2],5,$prix_de_vente_ht,1,0,'R');
$this->Cell($w[3],5,$quantite,1,0,'C');
$this->Cell($w[4],5,$total_ht_produit,1,0,'R');
$this->Ln();
}
if(($j>20)
{
$this->AddPage(); //j'affiche le 21eme produit sur une autre page
$this->Cell($w[0],5,$reference,1,0,'L');
$this->Cell($w[1],5,$libelle_produit,1,0,'L');
$this->Cell($w[2],5,$prix_de_vente_ht,1,0,'R');
$this->Cell($w[3],5,$quantite,1,0,'C');
$this->Cell($w[4],5,$total_ht_produit,1,0,'R');
$this->Ln();
} |
Partager