-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
62 lines (53 loc) · 1.18 KB
/
index.php
File metadata and controls
62 lines (53 loc) · 1.18 KB
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
61
62
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$people = [
[
"name" => "Haidar",
"age" => 20
],
[
"name" => "Saif",
"age" => 20
],
[
"name" => "Ali",
"age" => 20
],
[
"name" => "Ameer",
"age" => 20
],
];
$show_message = false;
$title = "Home";
?>
<!doctype html>
<html lang="en">
<?php
include 'head.php';
?>
<body class="bg-light">
<div class="container">
<div class="row justify-content-center mt-5">
<div class="col-md-5">
<ul class="list-group">
<?php foreach ($people as $person): ?>
<li class="list-group-item"><?= $person["name"] ?> </li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="row justify-content-center mt-5">
<div class="col-md-5">
<?php if (!$show_message): ?>
<h3 class="text-center">Hello, i'm the message</h3>
<?php else: ?>
<h3 class="text-center">Hello, i'm not the message</h3>
<?php endif; ?>
</div>
</div>
</div>
</body>
</html>