/*
- Format Number
- Formats a number with grouped thousands and decimals.
$number - The number to be formatted
$decimals - The number of decimals the number should have
$thousandsSeperator - How every thousand should be seperated (usually by a comma)
$decSeperator - How decimals should be seperated (usually be a period)
*/
public function formatNumber($number, $decimals = 0, $thousandsSeperator = ',', $decSeperator = '.') {
return number_format($number, $decimals, $decSeperator, $thousandsSeperator);
}
Comments