Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:create:functions:looptopage [31.05.2016 09:31] – [2nd example] info_familienwissenschaftenen:create:functions:looptopage [29.12.2018 16:53] (current) – bei $fragen =arrray ein r entfernt wimmer.andreas
Line 33: Line 33:
  
 <code php> <code php>
-$fragen = arrray(+$fragen = array(
   0 => array('A001', 'A002', 'A003', 'A004', 'A005'),   0 => array('A001', 'A002', 'A003', 'A004', 'A005'),
   1 => array('A101', 'A102', 'A103', 'A104', 'A105'),   1 => array('A101', 'A102', 'A103', 'A104', 'A105'),
Line 69: Line 69:
 Earlier on page 3 you asked a question with 10 possible //free mentions// as answers (''ON01''). You want to repeat the following pages for every answer given.  Earlier on page 3 you asked a question with 10 possible //free mentions// as answers (''ON01''). You want to repeat the following pages for every answer given. 
  
-You copied the section ''A0'' from the catalogue of questions nine times (section ''A1'' to ''A9''). Accordingly the questions look like the following:  +You copied the section ''A0'' from the catalogue of questions nine times (section ''A1'' to ''A9''). Accordingly the questions on page 5 are defined as follows:  
  
  
Line 88: Line 88:
 </code> </code>
  
-To make it more neat you can also use a FOR-loop. So as an alternative you could use the following PHP-code: +To make it more elegant you can also use a FOR-loop. Alternatively you can use the following PHP-code: 
  
  
Line 104: Line 104:
 </code> </code>
  
-It has to be specified how many "free mentions" the participant has given. With the command ''registerVariable()'' all answers are made available for the following pages. +Now it has to be specified how many "free mentions" the participant answered. With the command ''registerVariable()'' all answers are made available for the following pages. 
 Along with that the length of the list is determined with the command ''count()''. The length of the list matches the loops of the pages. The command ''loopToPage()'' initializes the loops.  Along with that the length of the list is determined with the command ''count()''. The length of the list matches the loops of the pages. The command ''loopToPage()'' initializes the loops. 
  
en/create/functions/looptopage.txt · Last modified: 29.12.2018 16:53 by wimmer.andreas
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki