如何在FPDF-php中显示Money符号

Good day Im a newbie programmer, please help me about this problem.

I want to display ₱ sign in pdf but in my code is displaying "&#8369";

this is my code sir / mam

$a = htmlentities("₱");
$b = iconv('UTF-8', 'windows-1252', html_entity_decode($a));
$pdf->Write(5,"Your amount balance is".$b."-".$balancevalue);

My coding is totally finish if this money sign will display.

Thanks in advance and Im very sorry if my English is too bad :)

After you use htmlentities function, $a becomes ₱, and after html_entity_decode, $b becomes ₱, not the unicode ₱ sign.

Try using this:

$a = "₱";

instead of this:

$a = htmlentities("₱");

When using FPDF fonts use ISO-8859-1 or Windows-1252.

If the iconv extension is available, here's how to do it:

$a = '₱';
$b = iconv('UTF-8', 'windows-1252', $a);
$pdf->Write(5,"Your amount balance is".$b."-".$balancevalue);

Give it a shot and let me know what happens.

Happy Coding !

$pdf->SetFont('dejavusans', '', 10);