$handle = fopen('liste.txt', 'r'); while ($line = fgetcsv($handle, 1024, ':')) { $line[4] = preg_replace('#\\\\#', '', $line[4]); if (strlen(trim($line[0])) > 0) $tanz[$line[0]] = true; if (strlen(trim($line[2])) > 0) $album[$line[2]] = true; if (strlen(trim($line[3])) > 0) $interpret[$line[3]] = true; $lines[] = $line; } ksort($album); ksort($interpret); ?>
Tanz:
— alle —
foreach($tanz as $key => $value) { echo '
' . htmlspecialchars($key) . '
'; } ?>
Album:
— alle —
foreach($album as $key => $value) { echo '
' . htmlspecialchars($key) . '
'; } ?>
Interpret:
— alle —
foreach($interpret as $key => $value) { echo '
' . htmlspecialchars($key) . '
'; } ?>
Tanz
Tempo
Album
Interpret
Titel
foreach($lines as $line) { if ( ((strlen($_GET['tanz']) <= 0) || ($_GET['tanz'] == $line[0])) && ((strlen($_GET['album']) <= 0) || ($_GET['album'] == $line[2])) && ((strlen($_GET['interpret']) <= 0) || ($_GET['interpret'] == $line[3])) ) { ?>
echo htmlspecialchars($line[0]); ?>
echo htmlspecialchars($line[1]); ?>
echo htmlspecialchars($line[2]); ?>
echo htmlspecialchars($line[3]); ?>
echo htmlspecialchars($line[4]); ?>
} } fclose($handle); ?>