用PHP输出一个csv文件foreach($old['lines']as$line){fputcsv($new,$line);}比如$line的内容是:CA,12,YMU,13,YMU,12,N我希望的数据:"CA","12","Y""MU","13","Y""MU","12","N"我这样做foreach($linesas&$line){foreach($lineas&$column){$column='"'.$column.'"';}}结果出来每一列数据上都被加了两个双引号:""CA"",""12"",""Y""""MU"",""13"",""Y""""MU"",""12"",""N""这种方法不对,还是有其他更好的方法?
三国纷争
相关分类