Two pieces of php code that you may find helpful are:
1. The 301 redirect code, which will allow you to mask affiliate URL's
2. php include - which makes making sites updates easier.
There are several free resources out there where you can learn how to implement those in your site.
Just remember, if you already have a website and you want to change it to php, you could lose any
SEO value you have on the pages that are .html or .htm pages unless you do a server side redirect - which is a bit more involved than php coding. If the traffic isnt that great, then it may not matter to you.
Hope that helps.
Anthony