PHP MySQL Average

A

Anonymous

Guest
Hi:

My name is Ken Cooper. I haev a question on Average. Well, I select data from a database, and I finally do something like
$avg = $count2/$count3

And my question is, well, the result of the $avg is usually something like:
23.59869368. What I mean is, it comes out to be a REALLY big number with lots of digits. Is there a way I can LIMIT the number so it only has 2 digits after the decimal point? Thanks alot, I really appreciate it!

Ken Cooper
 
Again, just for help, if you need assistance on what I'm talking about, go to my site. http://www.coopercentral.org/poll/pollarchive.php - Then go to the bottom of the table and on the bottom right, it says Average, and thats a big number with lots of digits, I only was 2 digits after the decimal. Thanks.

Ken Cooper
 
Thanks a lot, I really appreciate it. I shall try that. Thanks again!!!!

Ken Cooper
 
Back
Top