Re: [SMARTY] How to count size of array in TPL?
| From: | John Wards | Date: | Wed, 27 Nov 2002 16:43:16 +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-6570@lists.php.net to get a copy of this message | ||
On Wednesday 27 Nov 2002 1:24 pm, BartekP wrote:
> I have 'foreach' loop based on associative array derived from
> database. I would like to print size of the array (number of rows)
> before 'foreach' loop. Any ideas?
Count it in PHP and pass the value to SMARTY as a SMARTY variable. That would
be a much better way to do it
John