How many Mondays in a month?

From: Date: Mon, 29 Sep 2003 15:21:56 +0000
Subject: How many Mondays in a month?
Groups: php.general 
Request: Send a blank email to php-general+get-164253@lists.php.net to get a copy of this message
Hi, I have posted a similar question in php.db, but I was wondering if someone could help out with a non-db issue. I am trying to display statistics of visitors to my web site, and what I would like to do is show the average number of visitors that have visited the site in a given month for a certain day e.g..: Stats for www.mysite.com for 09/2003 Monday - 15 average - 65 total Tuesday - 16 average - 66 total Wednesday - 14 average - 65 total Thursday - 13 average - 63 total Friday - 15 average - 65 total Saturday - 5 average - 25 total Sunday - 6 average - 28 total I have tried a number of ways to do this, but I cannot work out a way to show the number for example Mondays that will be in a given month, which I need to work out the average. I can work out the total easy enough, just not the average. TIA Phil Dowson

« previous php.general (#164253) next »