[PHP] Round with ONE-decimal... always...

2005-09-12 Thread Gustav Wiberg
Hi there! I want to adjust the round() -function a little... If I put round(6,0) there will be an output of 6 If I put round(6,32) there will be an output of 6,3 I want it to have 6,0 instead of just 6... I guess there is an easy solution to this? Suggestions? /G http://www.varupiraten.se/

Re: [PHP] Round with ONE-decimal... always...

2005-09-12 Thread Gustav Wiberg
Thanx! /G - Original Message - From: George Pitcher [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Monday, September 12, 2005 10:55 AM Subject: RE: [PHP] Round with ONE-decimal... always... Look at sprint_f() in the manual. George -Original Message- From

Re: [PHP] Round with ONE-decimal... always...

2005-09-12 Thread Jordan Miller
besides sprintf, number_format will also do it: number_format(6, 1, ',', '');// Outputs '6,0' Jordan On Sep 12, 2005, at 3:52 AM, Gustav Wiberg wrote: Hi there! I want to adjust the round() -function a little... If I put round(6,0) there will be an output of 6 If I put round(6,32)