• Welcome to Simple Machines Community Forum. Please login or sign up.



Formats a number to display in the style of the admin's choosing.


string comma_format (float $number[, int $override_decimal_count])

Parameter $number

Expected type: Double Precision
Description: The number to format

Parameter $override_decimal_count

Expected type: Integer
Description: "false" to use the decimal format set by the appropriate setting or an integer indicating how many decimal places to use (see http://www.php.net/number_format)

Return value

Expected type: String
Description: Returns the formatted number


  • Uses the format of number_format to decide how to format the number.
  • For example, it might display "1 234,50".
  • Caches the formatting data from the setting for optimization.