Need to use fwrite(); to overwrite a specific line/text in an preexisting file in PHP?

I'm trying to overwrite a specific line in a preexisting file in PHP. I can't figure a way to do this since 'a' sets the pointer at the end of the file.

I've read a little of fseek(); but don't particularly understand how to use it or if answers my needs. (I've checked PHP.net, but still don't quite grasp the function)
 
Back
Top