Can you put php directly in a .tpl file? I know a fair bit of php but have never messed about with templates.

So is this possible to put php directly into a .tpl using the <? ?> tags?

Thanks