thanks for thinking out loud...
what is your problem?
if you are asking CAN php do that? yes of course, that is basically exactlly what it was made for.
i think you might be confused about how it works... PHP is server side, so the users will still just see plain old HTML...
for a flat file, you would query the latest x articles, read their contents, and write them to a file, and then just include that file (using php or SSI) into your main page.