Genau so was...
Code:
$files = ListFiles($_SERVER['DOCUMENT_ROOT'].'/Developer/Artikel/', 'time');
$year2006 = Array();
$cnt2006 = 0;
$yaer2005 = Array();
$cnt2005 = 0;
foreach($files as $file)
{
$title = GetTitleFromHTML($$file);
switch (date("Y", filemtime($file)))
{
case '2006':
$year2006[$cnt2006] = $file;
$cnt2006++;
break;
case '2005':
$year2005[$cnt2005] = $file;
$cnt2005++;
break;
}
}
echo "2006
\n";
foreach($year2006 as $file)
{
$title = GetTitleFromHTML($file);
echo "$title
\n";
}
echo "
";
echo "2005
\n";
foreach($year2005 as $file)
{
$title = GetTitleFromHTML($file);
echo "$title
\n";
}
...wollte ich eigentlich vermeiden.