Rounding Numbers With PHP

Associate
Joined
6 Feb 2003
Posts
1,105
Location
London
Ive been using PHP's round function to convert floats (prices) to 2d.p. This is all well and good except when its already a number like 100.00 it gets rid of the decimal points and just gives back 100. Is there any way to get it to keep the .00 at the end of these whole numbers?
 
yea its purely for outputting purposes. I realise its the same number. I tried that number format thing, didnt have much luck with it though, just kept coming up blank :(
 
Back
Top Bottom