Is there a function to do this?
For example if I have an array like this:
array(
2014-08-05 10:23:34,
2014-08-08 13:12:56,
2014-08-07 08:02:21,
2014-08-06 11:22:33,
2014-08-03 6:02:44,
2014-08-08 10:23:34
);
and I'd like to return all the dates BETWEEN 2014-08-03 AND 2014-08-06.
There is a huge amount of data in these arrays, there may be even tens of thousands of data. I'm actually getting everything from the database and I'd like to divide the data by date (like 2 hours, 1 day, 3 days and so on, based on the time range a visitor selects).
How is it possible, without making huge queries or extensive PHP functions?
EDIT:
As per request I'm showing the data structure of the chart plugin (the values are just quick examples):
{x: '2014-08-05 10:23:34', y: 3, data1: 3, data2: 320, data3: 76},
{x: '2014-08-05 10:23:34', y: 2, data1: 1, data2: 300, data3: 27},
{x: '2014-08-05 10:23:34', y: 2, data1: 4, data2: 653, data3: 33},
{x: '2014-08-05 10:23:34', y: 3, data1: 3, data2: 120, data3: 54}