Re: [SMARTY] problem with dynamic "array key" in smarty

Ken Snyder <[email protected]> Wed, 25 Oct 2006 10:46:22 -0600
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
Are you looking for

{$be[$hno.sno]}

?

rs_satya wrote:
> I need to send an array value as a key to another array dynamically in a
> template.
> pls . Help me.
>
> the sample code is as follows:
>
> {foreach name=outer item=hno key=key from=$hoas}
> <tr>
> <td>
> {$hno.sno} //OK
>
> {$be[{$hno.sno}]} //I tried like this -- Wrong
>
> // Here I need to send this {$hno.sno} value as a key to {$be[]} associative
> array.
>
> </td>
> </tr>
> {/foreach}
>   

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php