RE: Section with Array key and value

From: Date: Tue, 02 Oct 2001 07:23:11 +0000
Subject: RE: Section with Array key and value
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1593@lists.php.net to get a copy of this message
{section name=test loop=$Array} Name --- {$Array.name} Title -- {$Array.title} .... {/section} It's in the doc ;) (though I agree the doc lacks complete examples of smarty use ;) Hi, I have assigned an array to a template var. $smarty->assign("Array",$array); The array looks like: $array["name"] = "foo"; $array["title"] = "bar"; $array["id"] = "1234"; In a section I want to have the key and the value from this array. {section name=test loop=$Array} ???key??? --- ???val??? {/section} The Output should looks like: name --- foo title --- bar id --- 1234 Who must the ???key??? looks like? Who must the ???val??? looks like? Thanks! Andreas --- You are currently subscribed to smarty as: arnaud.limbourg@cegetel.fr To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

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