Re: [PHP] Padding the decimals

2004-02-22 Thread John Nichel
Simon Fredriksson wrote: Is there any functions to pad the decimals in a number? There's round() to put it down to two decimals, but what if I want to take it up to two? Example: 5 -> 5.00 20 -> 20.00 4.3 -> 4.30 etc. //Simon http://www.php.net/manual/en/function.sprintf.php http://www.php.net/

Re: [PHP] Padding the decimals

2004-02-22 Thread Adam Bregenzer
On Sun, 2004-02-22 at 21:14, Simon Fredriksson wrote: > Is there any functions to pad the decimals in a number? There's round() > to put it down to two decimals, but what if I want to take it up to two? > > Example: > > 5 -> 5.00 > 20 -> 20.00 > 4.3 -> 4.30 > etc. I assume you mean adding zeros

[PHP] Padding the decimals

2004-02-22 Thread Simon Fredriksson
Is there any functions to pad the decimals in a number? There's round() to put it down to two decimals, but what if I want to take it up to two? Example: 5 -> 5.00 20 -> 20.00 4.3 -> 4.30 etc. //Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un