in a nutshell, technically:
if you want to delete one line of a file, you have to
- be able to clearly identify which line, either by a key at the beginning of the line or by its line number
- read in the entire file into an array (function: file), elimininate the line and overwrite the existing file with the new version
(ad 2.: read in the "old file" array, copy each line into a "new file" array in a loop, skipping the line which you want removed, then write the new file array to disk)
see reference for these functions on php.net:
file (for reading); fopen, fwrite, fclose (for writing)
maybe also: implode, explode, strpos for array handling and searching
whoops, quite a big nutshell 🙂