Problems with FPDF and Euro symbol

一笑奈何 提交于 2019-12-03 06:39:16

You actually can generate a PDF with euro signs using FPDF with using euro ascii code: chr(128).

It's good practice to make this a constant. At the top of your script, add:

define('EURO',chr(128));

Now you can use EURO in your script to print the euro symbol. For example:

"Costs: ".EURO.100

Will output: Costs: €100

Note: This will also work for other symbols with chr(ascii), where ascii is the ascii code of the symbol. You can find an overview of ascii codes on this page: http://www.atwebresults.com/ascii-codes.php?type=2

I've searched for ages, and nothing worked - until I used this: utf8_encode(chr(128))

if You Want to show this line "£4.30" just follow bellow

$text = chr(163); $pound = $text."4.30 p m";

Note: 163 = pound code;

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!