Unclassified NewsBoard Code Reference

format_number function

Format a number

function format_number ($x, $decimals = false, $range_factor = 0, $sep = '', $force_dec = false);

Parameters:

x
(any numeric) number for format
decimals  –  optional, default: false
(int) maximum number of decimals | false
range_factor  –  optional, default: 0
(int) 1000 | 1024...
sep  –  optional, default: ''
(string) separator between number and range sign (will always be added). " " (space) is often used
force_dec  –  optional, default: false
(bool) force decimal part in its full length: also add something like '.00'

Implementation file: unb_lib/common.lib.php, line 1664

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.