TheMathWizard/index.php
2022-12-10 14:25:53 +01:00

33 lines
No EOL
907 B
PHP

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Demo</title>
</head>
<body>
<?php
$books = [
[
'name' => 'Do Androids Dream of Electric Sheep',
'author' => 'Philip K. Dick',
'purchaseUrl' =>'http://example.com'
],
[
'name' => 'Projekt Hail Mary',
'author' => 'Ady Weir',
'purchaseUrl' => 'http://example.com'
]
];
?>
<?php foreach($books as $book): ?>
<li>
<a href="<?= $book['purchaseUrl']; ?>">
<?= $book['name']; ?>
</a>
</li>
<?php endforeach; ?>
</body>
</html>