From:
http://smarty.incutio.com/?page=SmartyTips
If you need to create an array from a string inside template use something like this:
Code:
{assign var="menu" value=","|split:"optionA,optionB,optionC"}
Comma "," can be replaced with any separator.
Result is the same as in php:
Code:
$menu = split(",","optionA,optionB,optionC");
$smarty->assign_by_ref("menu",$menu);