0
我想將一個CSV文件轉換成一個PHP數組,它以某種方式將所有的東西加入到單個字符串中。我希望用*號開始一個新行,以「,,」結尾,並用「,」分開。轉換CSV數組
下面是CSV的部分:
*,Alerts,Alert,Type,Text,,,,,,phr_ccr,alert,Type,,
*,Alerts,Alert,Type,Code,Value,,,,,phr_ccr,alert,Type,,
*,Alerts,Alert,Type,Code,CodingSystem,,Text,,,phr_ccr,alert,Type,,
*,Alerts,Alert,Agent,Products,Product,Description,Code,Value,,phr_ccr,alert,Product_Name_CD,,
*,Alerts,Alert,Agent,Products,Product,Description,Code,CodingSystem,,phr_ccr,alert,Product_Name_CDS,,
*,Alerts,Alert,Agent,Products,Product,Description,ProductName,*,,phr_ccr,alert,Product_Name,,
是直線尚未被EOL字符分隔? – 2014-11-08 16:03:55
fgetcsv會處理這個很好 – Ghost 2014-11-08 16:06:18