Re: [SMARTY] Get count of associative array
| From: | Monte Ohrt | Date: | Tue, 04 Feb 2003 17:44:50 +0000 |
| Subject: | Re: [SMARTY] Get count of associative array | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7514@lists.php.net to get a copy of this message | ||
{$var|@count}
On Tue, 2003-02-04 at 11:40, SavaJr wrote:
> Hello All
>
> Have pretty stupid problem.
>
> Need to get array length, assigned from php.
> Like "count($arr)" from php.
>
> In 2.3.1 - I used
> {php}
> $this->assign("some_var", count($arr));
> {/php}
>
> For now I need to access smarty namespace or how?
> Thinking about sort of function for this, but is there easier way?
>
> Any suggestions appricated.
>
> ------------------------
> Ruslan aka SavaJr
--
Monte Ohrt <monte@ispi.net>