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.
indeksowanie tablicy inna tablica...

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


Joined: 13 Feb 2007
Posts: 0

PostPosted: Tue Feb 13, 2007 2:53 pm    Post subject: indeksowanie tablicy inna tablica... Reply with quote

Witam wszystkich Smile
Mam pytanie, w jaki sposób mozna w smarty odwo?ywa? do czego? takiego. Mam taka tabele $GLOBALS['strona']['daneFormularza'];
Code:

Array ( [pytanie] => Twoj ulubiony system [odp1] => linux [odp2] => unix  )

Interesuj? mnie pola odp1...odpn (z reszta nie ma problemu)

Specjalnie do indeksowania po tej tabeli zrobilem sobie druga, $GLOBALS['strona']['odp']
Code:

Array ( [0] => odp1 [1] => odp2 [2] => odp3 [3] => odp4 [4] => odp5 [5] => odp6 [6] => odp7 [7] => odp8 [8] => odp9 [9] => odp10 [10] => odp11 )


no i w pliku szablonu zgodnie z dokumentacj? chcia?em zrobic to tak:
Code:

{section name=nr loop=$strona.odp}
{$strona.daneFormularza.$strona.odp[nr]}
{/section}

no i zawiodlem sie ;( nie chce mi to przejsc. bylbym bardzo wdzieczny za jakakolwiek wskazowke.
Pozdrawiam,
ypcat
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish 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