I can't believe this has actually come to me asking a question. But I have some decimal values in my database ie 0.9999999
, using:
number_format($result['debit'], 2);
number_format($result['debit'], 2,".","");
number_format(floor($result['debit']*pow(10,2))/pow(10,2),2);
I am continually getting the value 1
back from my original 0.999999
.
It doesn't seem to matter what I try, it constantly rounds the number. What can I do to simply get 0.99
? I am at the point where I am going to explode (currently I mean the function)
Another note is this will need to work with negative numbers.