您好我有需要過濾的CSV文件,從A-C,d-F等過濾CSV使用PHP
Aaron, Male, [email protected]
Arianne, Female, [email protected]
Bea, Female, [email protected]
Carlos, Male, [email protected]
Drake, Male, [email protected]
Delilah, Female, [email protected]
Erica, Female, [email protected]
Flint, Male, [email protected]
我不是擅長PHP和我試圖通過下面這樣的代碼來修復它。
<?php
$file = fopen('LoggedInUsers.csv', 'r');
$first = array('Aaron');
$last = array('Carlos');
while (($line = fgetcsv($file)) !== FALSE) {
list($name, $log, $department) = $line;
$firstt = array('Aaron');
if ($first < 0) {
}
$last = array ('Carlos');
if ($last < 0) {
}
?>
你想幹什麼過濾或修復?這是關於排序嗎?你打算用「$ first」和「$ last」做什麼? – mario 2014-09-01 03:22:40