Using PHP in smarty can be done like this:
Code:
{php}Your PHP code here{/php}
However using PHP within smarty is not recommended as it decreases performance and caching ability is reduced. You should instead create its own php file and then assign into smarty.
Smarty code cant be used in php.