RE: [SMARTY] Dynamic Array Keys

From: Date: Mon, 16 Jun 2003 12:45:43 +0000
Subject: RE: [SMARTY] Dynamic Array Keys
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9720@lists.php.net to get a copy of this message
I'm not sure what you are trying to do. I've tried similar things using the foreach clause, but that was to loop through a sequence fields and rows in a data row set. Something like {foreach name=outer item=dataset from=$mydata} {foreach key=key item=item from=$mykeys} {$dataset[$item]} {/foreach} {/foreach} Where $mydata is a nested array where the outer array contains row records and each row record contains an associated array. $mykeys are the arbitrary associative key fields I want to spit out. I think you may be asking something simpler. You might be able to do something like $arypost[$myfield] Where arypost is an associative array you pass in and $myfield is the name of a key you pass in. -----Original Message----- From: Alex [mailto:alex@pvl.at] Sent: Monday, June 16, 2003 8:16 AM To: smarty-general@lists.php.net Subject: [SMARTY] Dynamic Array Keys I am trying to reference an array key which is a variable itself, is it possible at all, eg $smarty.post.element$thisrowid the above does not work, may it be a syntax problem or is that not possible at all? best regards, alex -- .::....::.:...::...:..:.:::..:..:..::.:..:..:::..:::...::..:.. :: PUBLIC VOICE Lab :: Alexey Kulikov :: :: The International Media Coop :: alex@pvl.at :: :: www.pvl.at :: phone: +43 699 1 9228792 :: -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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