Create array in Smarty template
This method works for me:
{assign var=visible_fields value=','|explode:'value1,value2'}
&lt;div&gt;Visible fields var:
  {foreach from=$visible_fields item=foo}
    &lt;div&gt;Element is {$foo}&lt;/div&gt;
  {/foreach}
&lt;/div&gt;