Re: [SMARTY] Array index variables

From: Date: Fri, 10 May 2002 07:22:14 +0000
Subject: Re: [SMARTY] Array index variables
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4147@lists.php.net to get a copy of this message
> > I am using 2.1.0, and am still receiving the error. Is there any way I > > can further troubleshoot it? > > What is the error exactly? Can you reproduce it with a template having > just that one line? > Hope I can help here. I reproduced the error with a template having just one line. PHP-file smarty_test.php: $smarty->assign('test_array',array('one','two','three','four')); $smarty->assign('index',3); Template multi_dim_array.tpl: Test: {$test_array[$index]} Error-Message: [10-May-2002 09:00:20] PHP Warning: Smarty plugin error: [in webroot/test/multi_dim_array.tpl line 1]: unknown tag - '$test_array[$index]' in d:\wwwroot\dev.net\smarty\Smarty.class.php on line 1808 [10-May-2002 09:00:20] PHP Fatal error: Call to undefined function: () in d:\wwwroot\dev.net\webroot\templates_c\144\1449545085\0.php on line 4 Tested on PHP 4.1.2, Apache, Win2000 with Smarty 2.1.0 and 2.1.1. Nevertheless {$test_array.$index} works fine. Jens

« previous php.smarty.general (#4147) next »