开发者

Any way to open CSV file with PHP and replace certain text?

As the title says, I am trying to open a CS开发者_C百科V file that is comma delimited and I need to update specific part of the CSV string. Is that possible? I have looked into fseek but that only let's me count the number of bytes from the BOF so that won't work as each CSV would be different.

I was thinking if it was possible if I set the specific part I want to change with something like "CHANGEME" and have PHP look for that string/character and replace that with whatever I need.

Possible?


Try fgetcsv (documentation) or str_getcsv.

Maybe these functions will help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜