Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $assessmentQuestions = [
- 1 => 'My face gets hot and blushes',
- 2 => 'I have nightmares',
- 3 => 'I feel like I’m falling apart and going to pieces',
- 4 => 'I get so lost in thoughts that I ignore or forget my surroundings',
- 5 => 'If the room is full, I stay closer to the walls, avoiding the center',
- 6 => 'I fall asleep easily and get a good night’s rest',
- 7 => 'I am bothered by headaches, neck and back pains',
- 8 => 'I feel that everything is all right and nothing bad will happen',
- 9 => 'I can feel my heart beating fast',
- 10 => 'My travel plans are well thought out',
- 11 => 'I get upset easily or feel panicky',
- 12 => 'I feel more energetic after spending time with a group of people'
- ];
- $fakepost = [
- q1 => 5,
- q2 => 3,
- q3 => 5,
- q4 => 6,
- q5 => 6,
- q6 => 5,
- q7 => 5,
- q8 => 6,
- q9 => 5,
- q10 => 5,
- q11 => 5,
- q12 => 6,
- q13 => 5,
- q14 => 5,
- q15 => 6,
- q16 => 5,
- q17 => 4,
- q18 => 5,
- q19 => 5,
- q20 => 5,
- q21 => 5,
- q22 => 6,
- q23 => 5,
- q24 => 6,
- q25 => 5,
- q26 => 5,
- q27 => 7,
- q28 => 2,
- q29 => 5,
- q30 => 6,
- q31 => 6,
- q32 => 5,
- q33 => 6,
- q34 => 6,
- q35 => 4,
- q36 => 6
- ];
- $reverseQuestions = [5, 6, 8, 14, 18, 27, 31, 32, 35];
- for ($i = 1; $i <= sizeof($assessmentQuestions); $i++) {
- $questionName = 'q' . $i;
- echo $questionName . '<br>';
- if (in_array($i, $reverseQuestions) && in_array($i, $assessmentQuestions)) {
- if ($fakepost[$questionName] == 1) { $qwew = 7; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 2) { $qwew = 6; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 3) { $qwew = 5; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 4) { $qwew = 4; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 5) { $qwew = 3; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 6) { $qwew = 2; echo $qwew . '<br>';}
- else if ($fakepost[$questionName] == 7) { $qwew = 1; echo $qwew . '<br>';}
- }
- else if (!in_array($i, $reverseQuestions) && in_array($i, $assessmentQuestions)) {
- $qwew = $fakepost[$questionName]; echo $qwew . '<br>';
- }
- echo 'POST: ' . $fakepost[$questionName] . '<br>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement