How to assign an array of values ββto a parameter in Smarty?
In my php code.
$version_config = array( "list" => array( "123" ), ... other params ) $this->getView()->assign('version_config', $version_config); $this->getView()->assign('version_list', $version_config['list']); In my tpl code
{assign var="version_list2" value="{$version_config.list}"} {$version_list2} is the string value of the Array, and {$version_list2} is the array. Do I need a few more operations to encode {$version_list2} into an array?
+5
1 answer