如何过滤文件"按作者"和"按姓名"?原来只是读取文件本身。我不知道接下来该做什么。
if (isset($_POST['filter'])) {
$row = 1;
if (($handle = fopen("books.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "<br />\n";
}
}
fclose($handle);
}
}