To empty a specific line, use stock:
PHP Code:
empty_line( file_name[ ], line )
write_file( file_name, "", line );
If you want to remove some word from the file:
1. Read the file to memory.
2. Empty things you want. Natives for that exist already.
3. Write the modified text to the file.