function addCols( $tab ) { global $colonnes; $r1 = 10; $r2 = $this->w - ($r1 * 2) ; $y1 = 100; $y2 = $this->h - 50 - $y1; $this->SetXY( $r1, $y1 ); //$this->RoundedRect($x, $y, $w, $h, 3.5, 'D'); $this->RoundedRect( $r1, $y1, $r2, $y2, 3.5, "D"); $this->Line( $r1, $y1+6, $r1+$r2, $y1+6); $colX = $r1; $colonnes = $tab; //while ( list( $lib, $pos ) = each ($tab) ) for($i = 0; list( $lib, $pos ) = $tab[$i]; $i < count($tab); $i++; list( $lib, $pos ) = $tab[$i]) { $this->SetXY( $colX, $y1+2 ); $this->Cell( $pos, 1, $lib, 0, 0, "C"); $colX += $pos; $this->Line( $colX, $y1, $colX, $y1+$y2); } }