Re: [SMARTY] Count array function/modifier -- does it exist?
| From: | Monte Ohrt | Date: | Fri, 26 Jul 2002 13:12:23 +0000 |
| Subject: | Re: [SMARTY] Count array function/modifier -- does it exist? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5461@lists.php.net to get a copy of this message | ||
Yes you can.
{$array|@count}
the "@" symbol applies the modifier to the array instead of each individual element.
http://smarty.php.net/manual/en/language.modifiers.html
Hendy Irawan wrote:
Hi all in smarty-general, I wonder whether a template function/modifier is available to count the number of items in an array. There modifiers to count words, paragraphs, etc. but to count arrays??? (yes, just a simple call to count($whaterever);) Thank you. Salam hangat, Hendy Irawan - www.GaulDong.NET Kantor: (021) 5260467 [SoftVation] Kos: (021) 5261839 [kamar 3]-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.