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()

[PHP] Deleting 1 file line

2001-05-16 Thread Tarrant Costelloe
Does anyone know what the code is, if you wanted to specify a specific line in a file to delete and also to wipe clean the entire file? Thanks in advance! Taz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO