I have been using fopen, fread, and fwrite to create and add content to txt files. Now i need to be able delete only certain sections of a txt file. the sections are appending "=>" to beginning of entries, I was using it to properly explode() the file for reading back properly. dont know if that helps.. Need some way to use delimiters like explode() does to find the section i need, and im not sure if that's the best way for this or not, and then I have no idea where to start for deleting that oart of the file only. any ideas? thanks in advance
fuston05
0
Junior Poster in Training
Recommended Answers
Jump to PostCan you post an example of the format of the text files you're trying to work with?
Jump to PostCan you post a sample of the produced text files as well? That should be enough to get an understanding of how to process them out.
Jump to PostAssuming everything is on a single line.
My initial thought on this, is to change the format of the file you're creating so each event is on its own line. This would eliminate the need for a separation character, new line, new event. This would also make it possible …
All 12 Replies
fuston05
0
Junior Poster in Training
mschroeder
251
Bestower of Knowledge
Team Colleague
fuston05
0
Junior Poster in Training
mschroeder
251
Bestower of Knowledge
Team Colleague
fuston05
0
Junior Poster in Training
mschroeder
251
Bestower of Knowledge
Team Colleague
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
mschroeder
251
Bestower of Knowledge
Team Colleague
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.