diff --git a/library/includes/functions.php b/library/includes/functions.php index e3d387559..7dbcf0953 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -568,6 +568,14 @@ function url_arg($url, $arg, $value, $amp = '&') return $url . $anchor; } +/** + * Adds commas between every group of thousands + */ +function commify($number): string +{ + return number_format($number); +} + /** * Returns a size formatted in a more human-friendly format, rounded to the nearest GB, MB, KB.. */