Tag Archives: money-format

PHP money_format(); £ sign not GBP

I cannot work out how to get the currency symbol?
At the moment I am using

setlocale(LC_MONETARY, 'en_GB');
money_format('%i', 1000);

Which give me the output

GBP1,000

But I want

£1,000

I have checked out the PHP manual but it isn’t Continue reading

Tagged , | 4 Comments

How to output abbreviated currency symbol instead of currency name when using money_format()?

Is there a flag in the money_format function that lets you replace the long currency (e.g. USD, EUR) with the abbreviated version ($, €)?… Continue reading

Tagged , | Leave a comment

If dealing with money in a float is bad, then why does money_format() do it?

I’ve been waffling on how to deal with currency display and math in PHP, and for a long time have been storing it in MySQL using the DECIMAL type, and using money_format()… to format it for display on the web Continue reading

Tagged , , , , | Leave a comment
1 pages