Discussion: finding array members
Afficher un message
Vieux 06/04/2006, 14h46   #2
boots
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] finding array members

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 <lister@pikkle.com> 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
  Réponse avec citation
 
Page generated in 0,04363 seconds with 9 queries