Reputation: 13
I want show this number for example
100.258 -> 100.25
I try do it with number_format("100.258",2,"."," ");
but it return me 100.00, how can I do it, really I try search on internet but nothing work.
Upvotes: 1
Views: 51
Reputation: 891
This will give you needed output.
$number = 100.258;
$roundedDown = floor($number * 100) / 100;
Upvotes: 3