Re: [PHP] Deleting 1 file line

2001-05-16 Thread John Monfort
I don't know the code, but I would assume you could do the following: 1) read the file into an array, with each line as an element 2) search the element that has the line you're looking for...probably a keyword 3) remove that element from the array 4) implode the array 5) rewrite th

Re: [PHP] Deleting 1 file line

2001-05-16 Thread elias
Good question. Never had to face such problems before... but what I can do actually is: 1) Read file into variable till i reach that line 2) Skip that line 3) Continue reading till eof 4) writting back the buffer to the file. Basically use file() then preg_replace() then fopen() fwrite() fclose()