[SMARTY] assign template var with number of elements of an array

Nuno Mendes <[email protected]> Fri, 20 Oct 2006 20:40:57 +0100
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php