I need to build table with features in JS and display it on .tpl. I want to transfer array from smarty to JS. At first, i try with variable:
{literal}<script language="javascript" type="text/javascript">
<!-- // variable="{/literal}{$product->name|escape:'html':'UTF-8'}{literal}";
// --> </script>{/literal}
and it work's. Than i try with array:
{literal}<script language="javascript" type="text/javascript">
<!-- // array="{/literal}{$features|json_encode}{literal}";
// --> </script>{/literal}
and this solution is not working. Do you have any ideas how can I build array in JS from array in smarty?