International characters

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
PhpDog
Forum Commoner
Posts: 58
Joined: Mon Jan 14, 2008 10:23 am

International characters

Post by PhpDog »

I have a mssql table that I have to work with which contains entries like:

a) Payment of ce4.00 received

When displayed by PHP in a webpage (verdana font) it shows as:

b) Payment of œ4.00 received

I actually think it should say:

c) Payment of £4.00 received.

How can I correct this so my web application displays as example c) please?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: International characters

Post by liljester »

you could use the HTML escape for the pound sign (£) when you display. you would have to replace the "ce" part of your data, possibly with the str_replace() function.

Code: Select all

$ouput = str_replace("ce", "£", $db_entry);
There may be a better way out there to do this, Im not sure.
PhpDog
Forum Commoner
Posts: 58
Joined: Mon Jan 14, 2008 10:23 am

Re: International characters

Post by PhpDog »

Thanks. That will nail it for now.
Post Reply