It's possible to switch Dreamweavers 'design' view to a 'coder' view which will let you see all the html code. I'm assuming you know PHP so everything from there on should be fairly straight forward to you. Otherwise just come back and ask.
Is it possible to insert some php coding in to a dreamweaver template? If so, how?