Group timestamps to months in PHP
I have an array with some informations and a timestamp each and I want to
echo their count grouped by month (year).
so my array looks like:
1 ('title' => 'foo', 'timestamp' => '1234567890')
2 ('title' => 'bar', 'timestamp' => '1987654320')
and the echo should look like:
January 2013 - 5 timestamps
February 2013 - 2 timestamps
June 2013 - 3 timestamps
if theres no timestamp in a month (year) it can be skipped.
Any suggestions how to start? Im ok with PHP syntax, arrays and loops but
i hate timestamps.
No comments:
Post a Comment