Tag Archive | two decimal place

How to Round a Number to Two Decimal Places in PHP?

Using number_format(), you can format a number. The first parameter of the function is the number to be formatted. The second parameter formats the first parameter with the number of decimals it shows and add a dot in front of it. In the following example below, each number will be rounded to the 2 decimal […]