Vytvoření první db + zaci.php vid:78

This commit is contained in:
kankys 2024-09-22 14:24:32 +02:00
parent 8eea606905
commit 6c87537056
2 changed files with 20 additions and 51 deletions

View File

@ -1,59 +1,28 @@
<?php <?php
$students = [
[
"first_name" => "Harry",
"second_name" => "Potter",
"age" => 11,
"life" => "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repudiandae temporibus ullam harum, nostrum nobis inventore, quaerat sit porro consequuntur, delectus eos.",
"college" => "Nebelvír",
],
[
"first_name" => "Hermiona",
"second_name" => "Grangerová",
"age" => 12,
"life" => "Repudiandae temporibus ullam harum, nostrum nobis inventore, quaerat sit porro consequuntur, delectus eos. Ducimus facere doloribus fuga error? Consectetur dolorem praesentium recusandae!",
"college" => "Nebelvír",
],
[
"first_name" => "Ron",
"second_name" => "Weasley",
"age" => 11,
"life" => "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repudiandae temporibus ullam harum, nostrum nobis inventore, quaerat sit porro consequuntur, delectus eos.",
"college" => "Nebelvír",
],
[
"first_name" => "Draco",
"second_name" => "Malfoy",
"age" => 12,
"life" => "Amet consectetur adipisicing elit. Repudiandae temporibus ullam harum, nostrum nobis inventore, quaerat sit porro consequuntur, delectus eos. ",
"college" => "Zmijozel",
],
];
?> ?>
<DOCTYPE html> <DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title> <title>Document</title>
</head> </head>
<body> <body>
<header> <header>
<h1>Škola čar a kouzel v Bradavicích</h1> <h1>Škola čar a kouzel v Bradavicích</h1>
</header> </header>
<main> <main>
<section> <section>
<?php foreach($students as $one_student): ?>
<h2><?= $one_student["first_name"]." ".$one_student["second_name"] ?></h2> </section>
<?php endforeach ?> </main>
</section>
</main>
<footer></footer> <footer></footer>
</body> </body>
</html> </html>

0
www2databaze/zaci.php Normal file
View File