Woche 1 fertig

This commit is contained in:
Robert
2023-11-07 01:14:33 +01:00
parent d1ee9c1fb9
commit 0c360ccb99
6 changed files with 13 additions and 5 deletions

View File

@@ -9,19 +9,23 @@
$gerichte = [
1 => ['name' => 'Rindfleich mit Bambus, Kaiserschoten und roter Paprika, dazu Mie Nudeln',
'priceint' => 3.50,
"priceex" => 6.20
"priceex" => 6.20,
"img" =>"img/bambus.jpg"
],
2 => ['name' => 'Spinatrisotto mit kleinen Samosateigecken und gemischter Salat',
'priceint' => 2.90,
"priceex" => 5.30
"priceex" => 5.30,
"img" =>"img/risotto.jpg"
],
3 => ['name' => 'Spaghetti Bolognese',
'priceint' => 3,
"priceex" => 5
"priceex" => 5,
"img" =>"img/bolo.jpg"
],
4 => ['name' => 'Spaghetti Carbonara',
'priceint' => 3,
"priceex" => 5
"priceex" => 5,
"img" =>"img/carbonara.jpg"
]
]
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
M2/Werbeseite/img/bolo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@@ -37,6 +37,9 @@ include "gerichte.php";
.speisen td {
border: solid;
border-collapse: collapse;
border-radius: 4px;
padding: 5px;
width: 150px;
}
.speisen td:not(:first-of-type) {
@@ -139,6 +142,7 @@ include "gerichte.php";
<td>Gerichte</td>
<td>Preis intern</td>
<td>Preis extern</td>
<td>Bild</td>
</tr>
<?php
/**
@@ -148,7 +152,7 @@ include "gerichte.php";
foreach ($gerichte as $gericht){
echo "<tr class=\"speisen\"><td>".$gericht["name"]."</td><td>".$gericht["priceint"]."</td><td>".$gericht["priceex"]."</td>";
echo "<tr class=\"speisen\"><td>".$gericht["name"]."</td><td>".$gericht["priceint"]."</td><td>".$gericht["priceex"]."</td><td><img src=".$gericht["img"]." alt=".$gericht["name"].">";
}
?>
</table>