Final Report

SetFillColor(255,0,0);
$this->SetTextColor(255);
$this->SetDrawColor(128,0,0);
$this->SetLineWidth(.3);
$this->SetFont(”,’B’);
// Header
$w = array(50, 45 , 60);
for($i=0;$iCell($w[$i],7,$header[$i],1,0,’C’,true);
$this->Ln();
// Color and font restoration
$this->SetFillColor(224,235,255);
$this->SetTextColor(0);
$this->SetFont(”);
// Data
$fill = false;
foreach($data as $row)
{
$this->Cell($w[0],6,$row[0],’LR’,0,’L’,$fill);
$this->Cell($w[1],6,$row[1],’LR’,0,’L’,$fill);
$this->Cell($w[2],6,number_format($row[2]),’LR’,0,’R’,$fill);
$this->Ln();
$fill = !$fill;
}
// Closing line
$this->Cell(array_sum($w),0,”,’T’);
}
}

$pdf = new PDF();
// Column headings
$header = array(‘Questions’, ‘Answers’, ‘Analaysis’);
// Data loading
$data = $pdf->LoadData(‘http://cashcowconsulting.net/final-report’);
$pdf->SetFont(‘Arial’,”,15);
$pdf->AddPage();
$pdf->FancyTable($header,$data);
$pdf->Output();
?>