📜  php csv 到多行数组 $_FILES - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:45.796000             🧑  作者: Mango

代码示例1
$csv_data = file($_FILES["filebutton"]["tmp_name"],FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
                
                $array = array();
                foreach ($csv_data as $line) {
                    // $array[] = str_getcsv($line); //the default separator is ,
                    $array[] = str_getcsv($line,";");
                }