我有像这样的csv行:
title, short desc, long desc, sku 1233, qty 100, 33.99, http://www.wired.com/wp-content/uploads/images_blogs/wiredscience/2011/06/siau_island_tarsier.jpg,
在fputcsv
之后变为:
title," short desc"," long desc"," sku 1233"," qty 100"," 33.99"," http://www.wired.com/wp-content/uploads/images_blogs/wiredscience/2011/06/siau_island_tarsier.jpg",
使用fputcsv
的代码是:
while ( ($fileop = fgetcsv($handle, 1000, ",")) !== false )
{
fputcsv($result, $fileop);
}
什么方法可以摆脱多个单词的双引号?
答案 0 :(得分:0)
无法与fputcsv
一起使用,所以我最终使用了fputs
:
fputs($result, implode($fileop, ',')."\n");