assign template var with number of elements of an array
| From: | Nuno Mendes | Date: | Fri, 20 Oct 2006 19:40:57 +0000 |
| Subject: | assign template var with number of elements of an array | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13521@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to create a variable inside a template (banners_count) and it's value needs to be the number of elements of an array. I am using this but it's not working.
{assign var=banners_count value=count($banners)}
How can it be done?
Thanks!
Nuno