Well how much php do you already know?? do you have the file open and close functions down??? if not start there, go to php.net and go to documentation, find fopen, and fclose, read about them and use them, then to replace the text, you will need to use the preg_replace() function, also read about it at php.net in the docs. You should be able to do it with out much trouble.