Give color to column in fpdf

0

want to know how I can give color to a colume, in this case that of "Hours", I can only give color to the initial row, here is my code, thanks for the help: D

     $pdf->SetFillColor('232','232','232');
     $pdf->SetFont('Arial','B','10');

     $pdf->Cell(57,6,'NOMBRE',1,0,'C',1);
     $pdf->Cell(25,6,'CEDULA',1,0,'C',1);
     $pdf->Cell(18,6,'HORAS',1,0,'C',1);
     $pdf->Cell(10,6,'VC',1,0,'C',1);
     $pdf->Cell(20,6,'ValorVC',1,0,'C',1);
     $pdf->Cell(10,6,'VR',1,0,'C',1);
     $pdf->Cell(20,6,'ValorVR',1,0,'C',1);
     $pdf->Cell(10,6,'PA',1,0,'C',1);
     $pdf->Cell(20,6,'ValorPA',1,0,'C',1);
     $pdf->Cell(10,6,'PRG',1,0,'C',1);
     $pdf->Cell(20,6,'ValorPRG',1,0,'C',1);
     $pdf->Cell(10,6,'PRI',1,0,'C',1);
     $pdf->Cell(20,6,'ValorPRI',1,0,'C',1);
     $pdf->Cell(10,6,'TAC',1,0,'C',1);
     $pdf->Cell(20,6,'ValorTAC',1,0,'C',1);
     $pdf->Cell(10,6,'TRM',1,0,'C',1);
     $pdf->Cell(20,6,'ValorTRM',1,0,'C',1);
     $pdf->Cell(10,6,'MLC',1,0,'C',1);
     $pdf->Cell(20,6,'ValorMLC',1,1,'C',1);



$pdf->SetFont('Arial','','9');

while ($row = $resultado->fetch_assoc())
{

    $pdf->Cell(57,6,utf8_decode($row['Nombre']),1,0,'C');
    $pdf->Cell(25,6,$row['Cedula'],1,0,'C');
    $pdf->Cell(18,6,$row['HorasTrabajo'],1,0,'C');
    $pdf->Cell(10,6,$row['VC'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorVC'] ,1,0,'C');
    $pdf->Cell(10,6,$row['VR'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorVR'] ,1,0,'C');
    $pdf->Cell(10,6,$row['PA'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorPA'] ,1,0,'C');
    $pdf->Cell(10,6,$row['PRG'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorPRG'] ,1,0,'C');
    $pdf->Cell(10,6,$row['PRI'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorPRI'] ,1,0,'C');
    $pdf->Cell(10,6,$row['TAC'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorTAC'] ,1,0,'C');
    $pdf->Cell(10,6,$row['TRM'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorTRM'] ,1,0,'C');
    $pdf->Cell(10,6,$row['MLC'] ,1,0,'C');
    $pdf->Cell(20,6,'$'.$row['ValorMLC'] ,1,1,'C');



}
    
asked by CristianLRS1997 30.05.2018 в 17:30
source

0 answers