I would like to create a skin system for my website using PHP. I would like it so all the visual elements are completely separate from the scripts. I have an idea but it isn't very efficient and I'm not entirely sure it would work.

Any help or links to tutorials etc. on this subject would be welcomed.