I have a array of dates like this
$dates = ('2014-01-21','2014-03-11','2013-01-21','2014-03-11','2013-07-21','2012-01-21');
I want to get array values where year is 2014. I mean when i change value to 2014 it will return value from array which contain year 2014 only. In this case it will return '2014-01-21','2014-03-11' to me. Is there a way to do this.