回答編集履歴
1
PHP
test
CHANGED
@@ -21,3 +21,22 @@
|
|
21
21
|
</script>
|
22
22
|
<div class="copyright">©sample</div>
|
23
23
|
```
|
24
|
+
ちなみにphpならこんな感じ
|
25
|
+
```PHP
|
26
|
+
<?PHP
|
27
|
+
$obj = [
|
28
|
+
"テキストa"=>"localhost/index",
|
29
|
+
"テキストb"=>"localhost/index2",
|
30
|
+
"テキストc"=>"localhost/index3",
|
31
|
+
];
|
32
|
+
?>
|
33
|
+
<div class="footer">
|
34
|
+
<ul class="footer_navlist">
|
35
|
+
<?PHP foreach($obj as $key=>$val){
|
36
|
+
print "<li><a href=\"$val\">$key</a></li>\n";
|
37
|
+
}
|
38
|
+
?>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
```
|
42
|
+
ただし、urlencodeやhtmlspecialcharsが必要になる可能性もあるので注意ください
|