Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
12:49 am Apr 29, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
Round-off problems in php
Mister_L
Msg#:3950084
2:25 pm on Jul 10, 2009
(gmt 0)
I have a program that calculates averages,but for some reason each result I get is rounded to the nearest integer.How can I fix this?
I'm using Apache 1.3.37 with php 5.2.0 and Mysql 5.0.81.
Thanks.
coopster
Msg#:3950089
2:31 pm on Jul 10, 2009
(gmt 0)
What function are you using to round and are you setting the precision as you desire?
Mister_L
Msg#:3950119
3:07 pm on Jul 10, 2009
(gmt 0)
I'm not using any function to round.I'm not interested in rounding,that's the problem.But I'm not setting the precision also...
coopster
Msg#:3950127
3:38 pm on Jul 10, 2009
(gmt 0)
You are going to need to offer more details. Where are you doing the calculation? In PHP? MySQL? I assume the numbers are float/real and not integer?
Mister_L
Msg#:3950154
4:16 pm on Jul 10, 2009
(gmt 0)
I think problem is solved,thanks anyway.
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Mar
,
Feb
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
what do they want?
Do you get tired of others copying your content?
AdSense Earnings and Observations - April 2026
Hello again, it's been a while
5 SEO Tips That Actually Worked for My Blog in 2026
iPhone Safari 26.4.1 errors: IPv4 & Host
I need some SEO help
Does SEO matter any more?
SEO question
Home
Forums Index
Server Side
/
PHP Server Side Scripting
12:49 am Apr 29, 2026