How do I reformat a decimal no. to show just 2 decimal places?
| From: | Gareth Mulholland | Date: | Wed, 28 Jun 2000 22:15:46 +0000 |
| Subject: | How do I reformat a decimal no. to show just 2 decimal places? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3683@lists.php.net to get a copy of this message | ||
I've got a script which does some maths and produces a variable
$sum1
Usually , when printed direct to the screen the variable looks something like:
124.283838277
What do I have to do to round it to the 2nd decimal place to look like
124.28
Thanks
Gareth Mulholland