This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
en:create:points [06.12.2015 15:03] – [Correct and Incorrect Answers] admin | en:create:points [23.03.2021 22:47] – [Correct and Incorrect Answers] sophia.schauer | ||
---|---|---|---|
Line 18: | Line 18: | ||
The simplest way of keeping score is for a quiz or a knowledge test. These have a range of selection questions and one of the options is correct for each one. | The simplest way of keeping score is for a quiz or a knowledge test. These have a range of selection questions and one of the options is correct for each one. | ||
- | The following PHP code initially defines which questions will be evaluated and what the correct response is. An [[: | + | The following PHP code initially defines which questions will be evaluated and what the correct response is. An [[: |
Line 26: | Line 26: | ||
<code php> | <code php> | ||
// Define questions and the correct answers | // Define questions and the correct answers | ||
- | $questions = array( | + | $questions = [ |
' | ' | ||
' | ' | ||
Line 33: | Line 33: | ||
' | ' | ||
// and so on | // and so on | ||
- | ); | + | ]; |
// Initialize counter variable | // Initialize counter variable |