This might be an idiot question, but how do you group by timestamps by
date? I mean, given a large number of timestamps, spanning many months,
how do grab them and say how many are from each day? If the timestamps
measure visits to a web site, how to easily say there were 45 visits on
January 4th?
The first idea that occurs to me is to put them all in an array and
then loop through the array and use date() on each, one at a time,
finding out the date of each and then adding up how many for each date.
But I'm wondering if PHP has a more direct, obvious command?
date? I mean, given a large number of timestamps, spanning many months,
how do grab them and say how many are from each day? If the timestamps
measure visits to a web site, how to easily say there were 45 visits on
January 4th?
The first idea that occurs to me is to put them all in an array and
then loop through the array and use date() on each, one at a time,
finding out the date of each and then adding up how many for each date.
But I'm wondering if PHP has a more direct, obvious command?
Comment