mitschrieb 24-12-11 (progp) und ordner umbennung
This commit is contained in:
20
progp/24-12-4 -- edicer 1/kleinearray.php
Normal file
20
progp/24-12-4 -- edicer 1/kleinearray.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$sonnenstunden = [8.9, 5.7, 8.3, 9.0, 0.5];
|
||||
|
||||
echo "<h2>for</h2>";
|
||||
|
||||
for ($i = 0; $i < count($sonnenstunden); $i++) {
|
||||
echo "$sonnenstunden[$i]<br>";
|
||||
}
|
||||
|
||||
echo "<h1>-------------</h1>";
|
||||
echo "<h2>foreach</h2>";
|
||||
|
||||
$sonnenstunden[]=4.8;
|
||||
|
||||
foreach ($sonnenstunden as $sonnen) {
|
||||
echo "$sonnen<br>";
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user