I'm trying to display a decimal number and i want it to be displayed with 2 decimal numbers always. e.g. 5.95
the problem with this is that when the number is 10.00 it will be displayed as 10
is there a way to fix this?
http://us.php.net/manual/en/function.number-format.php
You may also want to look at [man]sprintf[/man] and [man]printf[/man], e.g.:
printf('%.2f', $value);
This one does exactly what i need!
number_format($total, 2, '.', '');
Thank you guys