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
3:51 pm May 22, 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
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
May 2026 Google Search Observations
AI visibility audit
AdSense Earnings and Observations - May 2026
Page indexed but live url test gets 500 error
AI Generated Content vs Human Written Content: What Does Google Prefer
Early Observations on UCP and the Direction of SEO
in case you missed it .
Hacker spoofing as GoogleBot
Adsense / Personal Manager / Support
Google I/O 2026: Impact on Directory Sites & Google-Extended Policy?
Home
Forums Index
Server Side
/
PHP Server Side Scripting
3:51 pm May 22, 2026