assign template var with number of elements of an array

[email protected] (Nuno Mendes) Fri, 20 Oct 2006 20:40:57 +0100
Newsgroups 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