Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:variables [05.02.2015 21:03] – [PHP Variables] alexander.ritteren:create:variables [05.02.2015 21:04] – [Working with Variables] alexander.ritter
Line 121: Line 121:
 ==== Working with Variables ==== ==== Working with Variables ====
  
-Variables allow you to calculate superbly. In the following example, the participant is asked question "AB01" on page 1 -- a text input for a number. The response is read on page 2 using ''value()'' and stored in the variable ''$number''. This variable it multiplied by 2 (''*'') and the result is stored in the variable ''$result''+Variables allow you to calculate superbly. In the following example, the participant is asked question "AB01" on page 1 -- a text input for a number. The response is read on page 2 using ''value()'' and stored in the variable ''$number''. This variable is multiplied by 2 (''*'') and the result is stored in the variable ''$result''
  
 Subsequently, the variable ''$result'' is treated as text (string) and linked with two other string (''.''). The result of this link is transferred to the function ''html()'' to display in the questionnaire. Subsequently, the variable ''$result'' is treated as text (string) and linked with two other string (''.''). The result of this link is transferred to the function ''html()'' to display in the questionnaire.
en/create/variables.txt · Last modified: 29.04.2021 20:58 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