If i have a set of years, retrieved by the loop, for every years can be more post ID. Like:
2008 => 3,7,8 2009 => 4,5,6 2010 => 9
the code is:
query_posts('post_type=portfolio&posts_per_page=-1'); if (have_posts()) : while (have_posts()) : the_post(); $tmp_date = //get the year;
What's the better way to put years and relative posts ID in an array (later i need also an array sorting by year)?