Posted by albert on 08/18/07 15:24
Hello,
Doing a simple division, I obtain this number :
0.0024096385542168672344587321276776492595672607421875
I'd like to have 0.0024 instead.
I know the number_format function but is it the right solution ?
I thought of another solution :
$MyDec = 0.0024096385542168672344587321276776492595672607421875;
$MyDecOk = round($MyDec * 10000) / 10000 ; # => 0.0024
Is there a special function to do so ?
Thanks in advance,
Albert
Navigation:
[Reply to this message]
|