[SMARTY] Counting number of array elements

Dep <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Organization dep
Message-ID <[email protected]>
Hello to all!

Is there any straight and obvious way to count the number of elements
in some array???

maybe I'm blind, but can't find that in the manual, and the only way
out I've found so far is like this.

{foreach from=$some_arr item=$i name="my_foreach"}{/foreach}
Number of elements: {$smarty.foreach.my_foreach.total}

Looks horribly stupid :) So, any other way?

Best regards
Dmitriy

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.