I have a list of dates in an array (in unix integer format).
I have sorted these numbers in ascending order. Done.
Now, I am looping through every element using the foreach command.
I am trying to add a echo '<p>'; every time the hour changes in the data…so I am trying to get a list of the dates, sorted, and with a <p> every hour so they are in hourly blocks…
How to do this?
Is this what you are looking for?
I also included the date in the hour string to prevent problems with the date changing. for example if a timestamp is for
1-NOV-2011 1:00amand the next timestamp is for2-NOV-2011 1:00amjust checking the hour will not echo a <p>. including the date will.