Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在通过fgetcsv(). 我想分别读取文件的标题和数据。下面是我的代码。有什么帮助吗?
fgetcsv()
$msg_row = 1; while (($result = fgetcsv($msg_file,1000, ",")) !== false) { $msg_data[] = $result; $msg_row++; }
所以先调用一次?
$msg_row = 1; $header = fgetcsv($msg_file, 1000, ","); while (($result = fgetcsv($msg_file, 1000, ",")) !== false) { $msg_data[] = $result; $msg_row++; }