Rounding off to two decimal places
| From: | Ben dot Joyce at idesk dot com | Date: | Thu, 02 Nov 2000 16:00:15 +0000 |
| Subject: | Rounding off to two decimal places | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-23417@lists.php.net to get a copy of this message | ||
Hi. I've just joined the list today so "Hello", etc etc.
I'm from an ASP background (argh! that hurt!) and I have a question
regarding rounding off a number.
I'm trying the following:
<td><?echo $font[1].$quota_units_max?></font></td>
When this line is executed the value of $quota_units_max is 4.9998350143433.
I'd like to display 4.99 (or 5.00, if I have to). on
http://uk.php.net/manual/function.round.php
it says I should be able to do
this:
$quota_units_max = round ($quota_units_max, 2);
When I try this I get the following error:
Warning: Wrong parameter count for round()
Any ideas?
Cheers,
.b
_________________________________________________________________
The information contained in this email is confidential and is intended only for
the use of the named addressee. If the reader of this message is not the
named addressee, you are hereby notified that any use of this email or its
contents, including dissemination or copying, is strictly prohibited. If you have
received this email in error please notify the IT manager by telephone on
0208 537 7745 or via email to sg1@idesk.com, including a copy of this
message. Please then delete this email and destroy any copies.
idesk plc
Registered office
190 The Strand
London
WC2R 1JN
2929301
_________________________________________________________________