回答編集履歴
1
変更
test
CHANGED
@@ -37,3 +37,47 @@
|
|
37
37
|
?>
|
38
38
|
|
39
39
|
```
|
40
|
+
|
41
|
+
# 変更
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
仕様が違いましたね
|
46
|
+
|
47
|
+
```PHP
|
48
|
+
|
49
|
+
<?PHP
|
50
|
+
|
51
|
+
$a=[
|
52
|
+
|
53
|
+
["id"=>1,"color"=>"赤","type"=>"a"],
|
54
|
+
|
55
|
+
["id"=>2,"color"=>"赤","type"=>"b"],
|
56
|
+
|
57
|
+
["id"=>3,"color"=>"青","type"=>"b"],
|
58
|
+
|
59
|
+
["id"=>4,"color"=>"青","type"=>"c"],
|
60
|
+
|
61
|
+
["id"=>5,"color"=>"緑","type"=>"c"],
|
62
|
+
|
63
|
+
];
|
64
|
+
|
65
|
+
array_walk($a,function($x){
|
66
|
+
|
67
|
+
print <<<eof
|
68
|
+
|
69
|
+
<div>
|
70
|
+
|
71
|
+
<p>色:[{$x["color"]}]</p>
|
72
|
+
|
73
|
+
<p>タイプ:[{$x["type"]}]</p>
|
74
|
+
|
75
|
+
</div>
|
76
|
+
|
77
|
+
eof;
|
78
|
+
|
79
|
+
});
|
80
|
+
|
81
|
+
?>
|
82
|
+
|
83
|
+
```
|