Hi to all.
I need to read a varible, an array contained in a tpl file, into another tpl file. This is my actually code.
the file with the array (my-list.tpl):
the main file:
Unfortunally the value of the variable my_list in the main file remain NULL. How can i fix it?
Help me plz. Thank in advice.
I need to read a varible, an array contained in a tpl file, into another tpl file. This is my actually code.
the file with the array (my-list.tpl):
Code:
{php}
$my_list = Array();
$my_list[0]['name'] = 'pluto';
$my_list[1]['name'] = 'pippo';
$this->assign('my_list_tmp',$my_list);
{/php}
{$my_list_tmp.0.name}
{assign var="my_list" value=$my_list_tmp scope=parent}
Code:
{include file="$template/my-list.tpl"}
{$my_list.0.name}
Help me plz. Thank in advice.