okay i am in desperate need of some type of php script that you can use to update a page, I have created one that writes data to a file but i need it to work so that when you update it all you have to fill in is the feilds you want to change
to the html file. Then within the script that does the work you will open the html doc, str_replace('<!--Content Begins-->','<!--Content Begins-->\n$CONTENT',$file_buffer);
then all you have to do is write the file back to itself and you get your data. You could see how by treating the fopen file buffer and reading out line by line, you could eventually build an entire page builder application using a series of comment tags and replace statements.
Sloopy and rather a pain to write out completely, but if you are choosing html files versus useing data driven content, there isnt much of a choice. You could get a little fancy with the code and maybe complete it in under 20 lines for a full blown application sitebuilder type app but it would still be a little more trouble then it is worth IMO.
Do you want to code one yourself or want to download one? Because there's a downloadable one at http://cafelog.com that you can use to update your website. It has categories and everything. It would be easier hacking something rather than coding your own from scratch
As for variables... if you have a lot of them, I'd recommend a database.