Part on Arrays is finished
This commit is contained in:
parent
da8d86c661
commit
7f7de38781
2 changed files with 11 additions and 12 deletions
22
index.php
22
index.php
|
|
@ -9,17 +9,17 @@
|
|||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$name = "Dark Matter";
|
||||
$read = true;
|
||||
if ($read) {
|
||||
$message = "You have read $name";
|
||||
}
|
||||
else {
|
||||
$message = "You havn't read $name.";
|
||||
}
|
||||
$books = [
|
||||
"Do Androids Dream of Electric Sheep",
|
||||
"The Langoliers",
|
||||
"Hail Mary"
|
||||
];
|
||||
?>
|
||||
<h1>
|
||||
<?= $message?>
|
||||
</h1>
|
||||
<h1>Recommended Book</h1>
|
||||
<ul>
|
||||
<?php foreach($books as $book) :?>
|
||||
<li><?php echo $book; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
body {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
font-family: sans-serif;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue