Skip to content

Commit a410389

Browse files
author
Marko
committed
Sada sam malo ovo rastavio da bih probao kondicionalno programiranje. jes kao da ga znam sad pa se bacam novim terminima po internetima
bas mi se spava danas, bas
1 parent cb09d6e commit a410389

File tree

2 files changed

+36
-17
lines changed

2 files changed

+36
-17
lines changed

index.php

+17-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,20 @@
1313
'Stric takodje'
1414
];
1515

16-
require './index.view.php';
16+
$person = [
17+
'age' => 33,
18+
'hair' => 'mrka',
19+
'career'=> 'web programer'
20+
];
21+
22+
$person['name'] = "Marko";
23+
24+
25+
$task = [
26+
'title'=>'Kupovina',
27+
'due_date'=>'22/01/20',
28+
'assigned'=>'Marko',
29+
'completed'=> True
30+
];
31+
32+
require 'index.view.php';

index.view.php

+19-16
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,30 @@
1515

1616
<body>
1717

18+
<ul>
19+
<?php foreach ($person as $feature => $val) : ?>
20+
<li><strong><?= $feature; ?></strong> <?= $val; ?> </li>
21+
<?php endforeach; ?>
1822

23+
</ul>
1924

20-
<ul>
25+
<ul>
26+
<li>
27+
<strong>Naslov zadatka:</strong> <?= $task['title']; ?>
28+
</li>
2129

30+
<li>
31+
<strong>Datum zavrsetka:</strong> <?= $task['due_date']; ?>
32+
</li>
2233

23-
<?php
24-
foreach ($names as $name){
34+
<li>
35+
<strong>Osoba:</strong> <?= $task['assigned']; ?>
36+
</li>
2537

26-
echo "<li>".$name."</li>";
27-
}
28-
?>
29-
</ul>
38+
<li>
39+
<strong>Status:</strong> <?= $task['completed']; ?>
40+
</li>
41+
</ul>
3042

31-
<ul>
32-
<?php
33-
foreach ($animals as $animal){
34-
echo "<li>$animal</li>";
35-
}
36-
?>
37-
</ul>
3843
</body>
3944
</html>
40-
41-

0 commit comments

Comments
 (0)