I know you can tell a variable to go to a certain number of decimal places using:

```
string number_format ( float $number [, int $decimals = 3 ] )

```

However, I cannot find a way of doing this en masse for all numbers. Since I have hundreds of variables, all of which need to have the same number of decimal places (whether it means rounding or extending zeros), I would like to be able to just tell it to automatically perform this command across the board instead of typing in the above command for all variables.

Does this function exist, or am I forced to type it all out the long way? Is there maybe a line in the .ini file that I could change if there is no command?

Thanks in advance.

---

I'm not storing these numbers in a database - I'm echo-ing them on the screen and sending an email. 

(There is an equation going on from user input being generated by an HTML form). 

The person receiving the email has asked that all numbers be rounded to the third decimal, whether that means rounding off at the thousandths or extending zeros to the thousandths if it only needed whole numbers, tenths, or hundredths. There are literally hundreds of individual variables, i.e. $number1, $number2, etc.