Use the PHP number_format function to format your numbers.
By [)ia6l0 iii
Format the numbers using Number_Format Function
The syntax is pretty simple:
$inputNumber = 12345.56;
$outputNumber = number_format($inputNumber,2);
And for more control over the formatting use the money_format function. It adheres
to specific region locale and then formats the input for you.
Use the PHP number_format function to format your numbers. (339 Views)