First, find the PHP file containing html_options
in the Smarty install. Then, include this function from your code. Finally, call the appropriate method in your PHP code.
There's no "official" Smarty way to do this, at least, none that I know of. I just double-checked the documentation and didn't see anything. But since Smarty is itself really just a program written in pure PHP, you shouldn't have problems with the above.
Note that if you have to do this, your code is "wrong" in conformance to the templating-system model: the idea of a templating system is to separate presentation from data. This means that if you have intense code which needs to generate raw HTML, you're doing it wrong.