burhanahmed92
0
Light Poster
Recommended Answers
Jump to Post$dates = array('2014-01-21','2014-03-11','2013-01-21','2014-03-11','2013-07-21','2012-01-21'); $year = 2014; $filteredItems = array_unique(array_filter($dates, function($elem) use($year){ return substr($elem,0,4) == $year; })); print_r( $filteredItems);
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.