Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Arraykey für weitere Referenz nutzen / parallele Arrays

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
pansenstar
Smarty n00b


Joined: 01 Mar 2005
Posts: 2

PostPosted: Tue Mar 01, 2005 3:56 pm    Post subject: Arraykey für weitere Referenz nutzen / parallele Arrays Reply with quote

hallo zusammen,

ich habe eine recht dumme arraystruktur, da ich diese nur wenig beeinflussen kann. Nun kann ich im vornherein auch nicht genau sagen, wie mein dukument aussehen wird, insofern muss ich das ganze so hier umsetzen:
Code:
  {foreach name=answerBlocks key=answerBlockKey item=answerBlockValue from=$form_data.elements}
    <div id="answer_head_box">
      <div id="answer_header">{$form_data.$answerBlockKey|default:"null"}</div>
[...]

wie ihr in der letzten zeile seht, brauche ich den namen des key 'answerBlockKey 'für eine weitere arrayposition. wie kann ich das machen?

alternativ: gibt es die möglichkeit zwei loops(foreach) parallel laufen zu lassen, so dass ich dadurch zum ziel gelange?

vielen dank,
andi
Back to top
View user's profile Send private message
pansenstar
Smarty n00b


Joined: 01 Mar 2005
Posts: 2

PostPosted: Tue Mar 01, 2005 4:18 pm    Post subject: Reply with quote

problem gelöst,

geht wie gesachrieben, ich hatte nur die falsche schachtelungsebene...

andi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP