I have an customer invoice table in my MySQL database with a DECIMAL(10,2) field called price.
When fetching these values in php and calculating a sum amount,
Try this:
$totalAmount = number_format($totalAmount, 2, '.', '');