im aware that the function money_format() is a linux only function, is there a similar function designed for windows users or do i have to do the maths myself?
i have both linux and windows web server but 99% of the time work in windows as thats where all my good software resides so i really need an equivalent so i dont have to keep switching to linux every 5 minutes
Mal
[SOLVED] money_format on windows?
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
[SOLVED] money_format on windows?
Last edited by malcolmboston on Tue Apr 06, 2004 4:12 am, edited 2 times in total.
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
just thought id post the fix
Code: Select all
$money = 12.1342
$currency= sprintf("%01.2f", $money);
// will output 12.13