我在 for 循环中运行查询并收到意外的 T_STRING 错误。请帮我。我只想回应查询。谢谢
<?php
$row = 1;
if (($handle = fopen("book1.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++) {
$query="UPDATE users SET email_alert=1 where email="trim($data[$c]")";
echo($query);
}
}
fclose($handle);
}
?>