You can round numbers in PHP to two decimal places by using:
PHP Code:
$num = round($num, 2);
If you want to just truncate to two decimal places, you can do:
PHP Code:
$num = round($num-0.005, 2);
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
|