PHP number formatting
MAR
01
Number formatting in php can be done in a few ways. You can simply round your number ( 2 decimal place accuracy ):
$num = round($num,2);
You can simply remove all decimals and make it an integer:
$num = intval($num);
There is even a function in php to format numbers for display:
echo number_format($num,2,'.',',');