Hello,
I want to print a double/float value,
but i get to much numbers behind the comma.
example: 55.3333333333
I only want 2 numbers behind the comma.
Thanks
Solved: print of double/float
Solved: print of double/float
Last edited by mister_v on Wed Feb 09, 2011 8:05 pm, edited 1 time in total.
Re: print of double/float
You can do this with the function number_format()
Code: Select all
$float = 55.3333333333;
$new_num = number_format($float, 2);
echo $new_num; //55.33