Re: [PHP] Re: PHP Equivalent of JavaScript whatever.toFixed(2)

2008-09-09 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Ross McKay schreef: Arnie Shore wrote: Folks, I need to take a given float value to, say, two decimals, as per subject JS. I've RTFM, but to no avail. On Mon, 08 Sep 2008 22:03:54 +0200, Sjoerd wrote: $str = sprintf("%01.2f", $number); Skinning

Re: [PHP] Re: PHP Equivalent of JavaScript whatever.toFixed(2)

2008-09-09 Thread Nathan Rixham
Jochem Maas wrote: Ross McKay schreef: Arnie Shore wrote: Folks, I need to take a given float value to, say, two decimals, as per subject JS. I've RTFM, but to no avail. On Mon, 08 Sep 2008 22:03:54 +0200, Sjoerd wrote: $str = sprintf("%01.2f", $number); Skinning cat, method two: $str =

Re: [PHP] Re: PHP Equivalent of JavaScript whatever.toFixed(2)

2008-09-09 Thread Jochem Maas
Ross McKay schreef: Arnie Shore wrote: Folks, I need to take a given float value to, say, two decimals, as per subject JS. I've RTFM, but to no avail. On Mon, 08 Sep 2008 22:03:54 +0200, Sjoerd wrote: $str = sprintf("%01.2f", $number); Skinning cat, method two: $str = number_format($numbe

[PHP] Re: PHP Equivalent of JavaScript whatever.toFixed(2)

2008-09-08 Thread Ross McKay
Arnie Shore wrote: >> Folks, I need to take a given float value to, say, two decimals, as per >> subject JS. I've RTFM, but to no avail. On Mon, 08 Sep 2008 22:03:54 +0200, Sjoerd wrote: >$str = sprintf("%01.2f", $number); Skinning cat, method two: $str = number_format($number, 2); -- Ross McK