Page 1 of 1

[SOLVED] money_format on windows?

Posted: Sat Apr 03, 2004 8:31 am
by malcolmboston
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

Posted: Sat Apr 03, 2004 9:13 am
by malcolmboston
no-one?

Posted: Tue Apr 06, 2004 4:12 am
by malcolmboston
just thought id post the fix

Code: Select all

$money = 12.1342
$currency= sprintf("%01.2f", $money);
// will output 12.13