Dear people,
I have a problem...
I have the following code to set the PHP into Spanish mode.
setlocale(LC_ALL, "es_ES");
My problem is that prices are entered into the database as for example:
9.99
If php has to add together two prices from the database e.g.
9.99 + 5.00
The result equals 14.99 but is formatted as 14, 99
Later in the code this figure may need to be added to a number from the database.
e.g. 2.00 + 14, 99
But or course this cannot be done as each figure is differently formatted.
Can I set php to format resultant calculatuions to say 14.99 instead of 14, 99 whilst in spanish mode?
Or even better format any numbers with decimals to the 14, 99 format.