foreach (array_reverse(glob("$articles/2???")) as $page) {
$year = basename($page, '.html');
printf('<h3><a href="/%s">%s</a></h3>'."\n", $page, $year);
printtoc($page, 'gallery');
}
foreach (array_reverse(glob("$articles/2???")) as $page) {
$year = basename($page, '.html');
printf('<h3><a href="/%s">%s</a></h3>'."\n", $page, $year);
printtoc($page, 'gallery');
}