Re: [SMARTY] How to count size of array in TPL?
| From: | Alexander Pervak | Date: | Wed, 27 Nov 2002 16:44:07 +0000 |
| Subject: | Re: [SMARTY] How to count size of array in TPL? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6571@lists.php.net to get a copy of this message | ||
Hello BartekP,
Wednesday, November 27, 2002, 3:24:40 PM, you wrote:
B> Hello
B> I have 'foreach' loop based on associative array derived from
B> database. I would like to print size of the array (number of rows)
B> before 'foreach' loop. Any ideas?
B> BartekP
Try
$smarty.foreach.loop_name.rownum
or
$smarty.foreach.loop_name.last
--
Best regards,
Alexander mailto:shura@ukrsat.com