RE: [SMARTY] Assoc. arrays

From: Date: Thu, 04 Sep 2003 16:58:20 +0000
Subject: RE: [SMARTY] Assoc. arrays
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10171@lists.php.net to get a copy of this message
Ops, I found it, its easy. {assign var=tmpKey value=$items[results].code} <tr bgcolor="{$rowColor.$tmpKey|default:"#eeeeee"}"> I was trying with {$rowColor.$items[results].code} and similars .. And directly I think you cannot do it. -----Mensaje original----- De: Javier Tacon Enviado el: jueves, 04 de septiembre de 2003 18:49 Para: smarty-general@lists.php.net Asunto: [SMARTY] Assoc. arrays Hi all, Anyone knows how can I access to an associative array with a dynamic key? For example, in PHP: $key = "key1"; print $array[$key]; Thanks in advance! Javier Tacón - Developer Private Media Group, Inc. www.prvt.com (Nasdaq: PRVT) -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#10171) next »