";
$firstLine = true;
foreach (file("$songDir/$set") as $line) {
// Skip first line which is merely the set name again
if ($firstLine) {
$firstLine = false;
continue;
} // if
if (preg_match ("/(.*)\s+-\s+(.*)/", $line, $matches)) {
$song = trim ($matches[1]);
$artist = trim ($matches[2]);
} else {
$song = trim ($line);
$artist = "";
} // if
if (file_exists ("$songDir/$song.pro")) {
print "
";
print basename ($song);
print "";
} else {
print "";
print basename ($song);
}
print " - ";
if (in_array ($artist, $artists)) {
print "$artist";
} else {
print $artist;
} // if
print "";
} // foreach
print "";
?>