├── extra-opdrachten.docx
├── opdracht_1.php
├── opdracht_2.php
├── opdracht_7.php
├── opdracht_6.php
├── opdracht_8.php
├── index.html
├── opdracht_5.php
├── opdracht_4.php
├── opdracht_9.php
└── opdracht_3.php
/extra-opdrachten.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoR/php-school-assignments/master/extra-opdrachten.docx
--------------------------------------------------------------------------------
/opdracht_1.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 1
5 |
6 |
7 |
18 |
19 |
--------------------------------------------------------------------------------
/opdracht_2.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 2
5 |
6 |
7 |
20 |
21 |
--------------------------------------------------------------------------------
/opdracht_7.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 7
5 |
6 |
7 |
8 |
9 | Worp: {$i}, Uitkomst: {$random_number}";
13 | }
14 | ?>
15 |
16 |
17 |
--------------------------------------------------------------------------------
/opdracht_6.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 6
5 |
6 |
7 | $weekdag";
13 | }
14 |
15 | ?>
16 |
17 |
18 |
--------------------------------------------------------------------------------
/opdracht_8.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 | Opdracht 8
13 |
14 |
15 |
21 |
22 | =$average?>
23 |
24 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PHP Opdrachten
5 |
6 |
7 | PHP Opdrachten
8 |
17 |
18 |
--------------------------------------------------------------------------------
/opdracht_5.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 5
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/opdracht_4.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 4
5 |
6 |
7 | Nummers: ${numbers_string} ";
16 | }
17 |
18 | $numbers_to_sort = [1337, 42, 69, 9, 11, 25091999, 420, 10, 8, 64];
19 |
20 | printNumbers($numbers_to_sort);
21 | rsort($numbers_to_sort);
22 | printNumbers($numbers_to_sort);
23 |
24 | ?>
25 |
26 |
27 |
--------------------------------------------------------------------------------
/opdracht_9.php:
--------------------------------------------------------------------------------
1 | 0) {
6 | $output[] = $number;
7 | $number--;
8 | }
9 | }
10 | ?>
11 |
12 |
13 |
14 | Opdracht 9
15 |
16 |
17 |
23 |
24 | ";
28 | }
29 | }
30 | ?>
31 |
32 |
--------------------------------------------------------------------------------
/opdracht_3.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Opdracht 3
5 |
6 |
7 |
8 | ${sentence}";
12 |
13 | // Create an array from the words in $sentence
14 | $words = explode(" ", $sentence);
15 |
16 | // Swap the first and last word in the words array
17 | $word_count = count($words) - 1;
18 | $last_word = $words[$word_count];
19 | $words[$word_count] = $words[0];
20 | $words[0] = $last_word;
21 |
22 | // Create a new from the modified $words array
23 | $new_sentence = implode(" ", $words);
24 |
25 | echo "${new_sentence}
";
26 | ?>
27 |
28 |
29 |
--------------------------------------------------------------------------------