View sourcecode

The following files exists in this folder. Click to view.

switch.php

45 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="sv">
<head>
        <meta charset="UTF-8" />
        <title>Switch</title>
</head>
<body>
    <!-- Detta är uppgift 12 -->
<?php
  $timme 
date("H");
  switch(
$timme){
    case 
8:
    case 
9:
    case 
10:
    case 
11:
    case 
12:
    case 
13:
    case 
14:
    case 
15:
        echo
"<p>Skoldagen pågår :/</p>";
        break;
    case 
16:
    case 
17:
    case 
18:
    case 
19:
    case 
20:
    case 
21:
    case 
22:
    case 
23:
    case 
24:
        echo
"<p>Skoldagen är slut :D</p>";
        break;
    case 
1:
    case 
2:
    case 
3:
    case 
4:
    case 
5:
    case 
6:
    case 
7:
        echo
"<p>Skoldagen har inte börjat :o</p>";
        break;
  }
  
?>
</body>
</html>