Re: [SMARTY] finding array members

boots <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Well, one simple way is to use php's array_keys as a modifier:

eg:

{assign var=keys value=$record|array_keys}

xo boots

--- D_C <[email protected]> wrote:

> i am working on a smarty template with some passed in arrays from
> another programmer.
> 
> is there a way in smarty of walking through the array to find out the
> index names etc?
> 
> eg in the   .tpl
> 
>  {$array[0].key}
> 
> or
> 
> {foreach item=fitem key=fkey from=$titem}
> {$fkey}
> 
> thanks!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
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.