dit lap script lijkt mij behoorlijk overdreven, kan het wat korter? volgens mij wel, maar ik zou niet weten hoe:
PHP:
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
| $aantalcd = $result - $result3; //aantal games in database if($result != 1){ if($result3 != 1){ if($aantalcd != 1){ echo "Er zijn in totaal $result games ingevoerd, waaronder $result3 DVD-games en $aantalcd CD-games!"; } else { echo "Er zijn in totaal $result games ingevoerd, waaronder $result3 DVD-games en $aantalcd CD-game!"; } } else { if($aantalcd != 1){ echo "Er zijn in totaal $result games ingevoerd, waaronder $result3 DVD-game en $aantalcd CD-games!"; } else { echo "Er zijn in totaal $result games ingevoerd, waaronder $result3 DVD-game en $aantalcd CD-game!"; } } } else { if($result3 != 1){ if($aantalcd != 1){ echo "Er is in totaal $result game ingevoerd, waaronder $result3 DVD-games en $aantalcd CD-games!"; } else { echo "Er is in totaal $result game ingevoerd, waaronder $result3 DVD-games en $aantalcd CD-game!"; } } else { if($aantalcd != 1){ echo "Er is in totaal $result game ingevoerd, waaronder $result3 DVD-game en $aantalcd CD-games!"; } else { echo "Er is in totaal $result game ingevoerd, waaronder $result3 DVD-game en $aantalcd CD-game!"; } } } |