How to make an element of an array bold in fpdf?

fpdf, php

Solution

You need to set the font you want, then add the cell and then change the style back:

//declare a style
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(20,10,"This will be regular Arial");

//declare another style, overwrites previous one
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(20,10,"This will be Arial Bold");

//set it back to normal
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(20,10,"This will be regular Arial once more")

Hope it helps

Problem

I am using fpdf I want to make an element of an array look bold. ``` $cell3[8][0] = 'Improved Yield : Farmer Business School Training'; ``` After Assigning all those values I will print them in pdf document ``` $pdf->FancyTable_2c($head3,$cell3); $pdf->Cell(8,5,'',0,1); ``` How to do this?

Original source