LordBurn Posted May 25, 2013 Share Posted May 25, 2013 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): {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} the main file: {include file="$template/my-list.tpl"} {$my_list.0.name} 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.