Ross McKay
2008-09-09 00:43:22 UTC
Folks, I need to take a given float value to, say, two decimals, as per
subject JS. I've RTFM, but to no avail.
$str = sprintf("%01.2f", $number);subject JS. I've RTFM, but to no avail.
$str = number_format($number, 2);
--
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php