How Do I Display the Pound Sterling (£) symbol in a PDF/PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kerryb
Forum Newbie
Posts: 5
Joined: Mon Sep 29, 2008 12:33 pm

How Do I Display the Pound Sterling (£) symbol in a PDF/PHP?

Post by kerryb »

Hello all,

I have a small problem that I'm not able to solve.

I am trying to create a PDF using the FPDF class from http://www.fpdf.org and in this pdf I need to display the pound sterling (£) symbol. Unfortunately, after I have created the pdf all the '£' symbols are preceded by an 'Â' symbol and I'm unable to find information anywhere how to escape the £ symbol so that it appears correctly in a PDF.

Can anyone give me any suggestions ?

Many Thanks

Kerry
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: How Do I Display the Pound Sterling (£) symbol in a PDF/PHP?

Post by panic! »

try:

&pounds;
kerryb
Forum Newbie
Posts: 5
Joined: Mon Sep 29, 2008 12:33 pm

Re: How Do I Display the Pound Sterling (£) symbol in a PDF/PHP?

Post by kerryb »

£ is how I leave it encoded in the MySQL database (incidentally when viewing the data through PHPMyAdmin the same  occurs although I've noticed this is doesn't happen all the time, sometimes the £ appears just as it should)

£ appears as £ in the PDF
Post Reply