Php over write text file

Hello all… I will try and keep this super simple in explanation…

I have a text file - lets call it “news.txt”

I have a php script that is being called to send new information to the “news.txt” file.

With each new “news” item that sent to the text file, the PHP script is adding it to the top of the previous entries.

It works good… but…
I would like it to keep a variable at the top of the “news.txt” file and never overwrite that. Lets say the variable is “theNews”… so in the “news.txt” file, I need it to read as follows:

theNews= and now here is the most current entry and following this is the rest of the previous entries.

Any ideas how I can do this? PHP is not my bag, but I am slowly learning how to understand how it functions.

thanks in advance