开发者

Backslashes in csv files

开发者 https://www.devze.com 2023-03-10 09:04 出处:网络
I\'m using php to read a csv file with tab as delimiter. I got a problem if the file contains backslashes. If I use the function 开发者_运维知识库stripslashes it works but I want to keep the values ho

I'm using php to read a csv file with tab as delimiter. I got a problem if the file contains backslashes. If I use the function 开发者_运维知识库stripslashes it works but I want to keep the values how they are in the csv file.

I think this issue is very strange. Anyone has an idea why is this happening?

Thanks.


Without seeing the code I can't give you any specific answers. However, from personal experience, when working with CSV files I've had the best luck using fgetcsv.

0

精彩评论

暂无评论...
验证码 换一张
取 消