I am working on a website using Smarty. I have searched the web to find out whether or not I can use
You can find the documentation here: http://www.smarty.net/documentation
No it's not possible. But you can use it in php and assign your results. Or in smarty you can use the if condition instead in a different way.