Number_format() function in php

Number_format() function in php

The number_format() function return the readable number. it takes one, two or four parameters and doesn’t take three parameters. This function gives you an easy way to format numbers for displaying to the user.

The number parameter is an only allow numeric value and it will be formatted without a decimal point and with comma (,) as the thousands separator.

The decimals parameter is an optional value. how many numbers after show decimal point.

The decimal point parameter is an optional value. it is specified which symbols use.

The separator parameter is an optional value. it is specified the thousands separator.

Syntax

See below Example

Please follow and like us: