0

I have a table created using FPDF. My problem is how to add an underline to specific text?

For example,

Name | Gender | Age

Dame | Female | 20

I want the "Name, Gender & Age" is underlined

This is my code so far

$p->Cell(20,5,'Name','LTR',0,'C',0);
$p->Cell(40,5,'Gender','TR',0,'C',0);
$p->Cell(40,5,'Age','TR',0,'C',0);

while(retrieve from DB)

Thanks in advance

SaidbakR
  • 13,303
  • 20
  • 101
  • 195
sasuke
  • 19
  • 1
  • 6

1 Answers1

0

Use SetFont for underlines. You can leave the font family blank to keep it the same.

$p->SetFont('','U');
$p->Cell(20,5,'Name','LTR',0,'C',0);
Muhammad Abdul-Rahim
  • 1,980
  • 19
  • 31