I have an array of date strings:
Array
(
[0] => 2014-03-24
[1] => 2014-03-18
[2] => 2014-06-08
[3] => 2014-08-21
[4] => 2014-09-11
)
I'd like to use the array_filter function to filter out all the entries older than a specific month and year:
array_filter($array, "newer_than");
function newer_than($var)
{
return (strtotime($var) > CURRENT MONTH AND YEAR);
}
Any help would be appreciated
Thanks
time()in place ofCURRENT MONTH AND YEAR.