Gen. partnerAlgotech

PHP function number_format()

Format a number with grouped thousands

|
September 11, 2019

Availability in PHP 4.0

Format a number with grouped thousands

Parameters

Parameter Data type Default value Note
$number float not The number being formatted.
$decimals int 0 Sets the number of decimal points.
$dec_point string '.'

Return values

string

A formatted version of number.

Other resources

Official documentation of the number-format function

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.