Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:create:variables [05.02.2015 21:04]
alexander.ritter [Working with Variables]
en:create:variables [05.02.2015 21:06]
alexander.ritter [Use Variables Continuously]
Line 142: Line 142:
 It makes sense that the stations are queried in the same order in both questions. In order to do so, first of a list ([[:​en:​create:​array|Array]]) of the item IDs in a random order is created using ''​[[:​en:​create:​functions:​random_items|random_items()]]''​. This list is stored in the variable ''​$items''​. It makes sense that the stations are queried in the same order in both questions. In order to do so, first of a list ([[:​en:​create:​array|Array]]) of the item IDs in a random order is created using ''​[[:​en:​create:​functions:​random_items|random_items()]]''​. This list is stored in the variable ''​$items''​.
  
-The variable ''​$items''​ is not only needed on the current page, but on the following page for question "​AB02"​ as well. Theefore, this is made available ​for future PHP code elements using ''​[[:​en:​create:​functions:​registervariable|registerVariable()]]''​. Subsequently,​ question "​AB01"​ will be displayed ​with the shuffled order. ​+The variable ''​$items''​ is not only needed on the current page, but on the following page for question "​AB02"​ as well. This is therefore ​made accessible ​for future PHP code elements using ''​[[:​en:​create:​functions:​registervariable|registerVariable()]]''​. Subsequently,​ question "​AB01"​ will be displayed ​in the shuffled order. ​
  
 <code php> <code php>
en/create/variables.txt · Last modified: 27.08.2018 15:46 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki