-
June 23rd, 2001, 09:33
#1
FWS Addict
Rounding using PHP
Here's my counter stats:
Total Visitors: 67897
Day: Visitors: Views:
Average 132.66666666667 276
20010623 45 77
20010622 224 484
20010621 129 267
should be rather obvious why i'd like some rounding
Either 3, 2, or no decimals (give your comments on which would be best)
-
June 23rd, 2001, 12:05
#2
Junior Member
$number = round($number, $precision);
Personally I prefer fractions over floating point (e.g. 398/3 instead of 132.6'), but using them would be a bit more work.
-
June 23rd, 2001, 13:32
#3
FWS Addict
fractions don't seem that hard...
echo $original . "/" . $divider;
or ni my case
$count . "/" . $days;
anyway, thanks for that function (and the link).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Bookmarks