RE: [SMARTY] Associative array question

From: Date: Mon, 10 Jun 2002 21:13:34 +0000
Subject: RE: [SMARTY] Associative array question
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4750@lists.php.net to get a copy of this message
Now that the list is awake again... :) Would someone have an idea on my issue below? -----Message d'origine----- De : Alain Fontaine [mailto:alain@valain.com] Envoyé : lundi 10 juin 2002 18:35 À : smarty-general@lists.php.net Objet : [SMARTY] Associative array question Hello! I have an array like this: $arrTypes = array("A" => "Appartement", "M" => "Maison"); I assign this array to the template: $Smarty->Assign("arrTypes", $arrTypes); Now I'd like to display the value of one particular key-value pair, and the key is stored in another variable. Manually, I can do: {$arrTypes.A} to display "Appartement". What is the syntax if "A" or "M" are themselves values of another Smarty variable? Thanks! --- Alain Fontaine VAlain sa -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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