We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe0c4a4 commit 02804efCopy full SHA for 02804ef
index.php
@@ -1,9 +1,11 @@
1
<?php
2
-$arrayLists = [
3
- 'ram',
4
- 'shyam',
5
- 'rita',
6
- 'gita'
+
+$persons = [
+ 'name' => 'Ram',
+ 'age' => 30,
7
+ 'address' => 'Kathmandu',
8
+ 'country' => 'Nepal'
9
];
10
11
require ('index.tpl.php');
index.tpl.php
@@ -18,8 +18,8 @@
18
19
20
<ul>
21
- <?php foreach($arrayLists as $list) :?>
22
- <li><?= $list; ?></li>
+ <?php foreach($persons as $attr => $value) :?>
+ <li><?= $attr.' :'. $value; ?></li>
23
<?php endforeach; ?>
24
</ul>
25
0 commit comments