回答編集履歴
5
コメントとロジックの微修正
test
CHANGED
@@ -72,14 +72,18 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
// "x回戦" で逆順sort
|
76
|
-
|
77
75
|
foreach((array)$array as $key => $value) {
|
78
76
|
|
79
77
|
foreach((array)$value as $_key => $_value) {
|
80
78
|
|
79
|
+
// "x回戦" で降順sort
|
80
|
+
|
81
81
|
krsort($_value);
|
82
82
|
|
83
|
+
// "x回戦" で逆順sort
|
84
|
+
|
85
|
+
// $_value = array_reverse($_value);
|
86
|
+
|
83
87
|
$value[$_key] = $_value;
|
84
88
|
|
85
89
|
}
|
4
本文の更新
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
下記の様なイメージでしょうか。
|
2
2
|
|
3
3
|
|
4
4
|
|
3
コメント修正
test
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
// "x回戦" で
|
75
|
+
// "x回戦" で逆順sort
|
76
76
|
|
77
77
|
foreach((array)$array as $key => $value) {
|
78
78
|
|
2
コメント修正
test
CHANGED
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
// x回戦
|
75
|
+
// "x回戦" で降順sort
|
76
76
|
|
77
77
|
foreach((array)$array as $key => $value) {
|
78
78
|
|
1
サンプルデータ変更に伴う修正
test
CHANGED
@@ -10,64 +10,64 @@
|
|
10
10
|
|
11
11
|
// test data
|
12
12
|
|
13
|
-
$array[
|
13
|
+
$array["ishikawa"] = array(
|
14
|
+
|
14
|
-
|
15
|
+
'20140716' => array(
|
16
|
+
|
15
|
-
'1回戦' => array(
|
17
|
+
'1回戦' => array(
|
16
|
-
|
18
|
+
|
17
|
-
'0' => array(
|
19
|
+
'0' => array(
|
18
|
-
|
20
|
+
|
19
|
-
'sen_name' => "テスト1",
|
21
|
+
'sen_name' => "テスト1",
|
20
|
-
|
22
|
+
|
21
|
-
'sen_score' => 10,
|
23
|
+
'sen_score' => 10,
|
22
|
-
|
24
|
+
|
23
|
-
'kou_name' => "テスト2",
|
25
|
+
'kou_name' => "テスト2",
|
24
|
-
|
26
|
+
|
25
|
-
'kou_score' => 0,
|
27
|
+
'kou_score' => 0,
|
28
|
+
|
29
|
+
),
|
26
30
|
|
27
31
|
),
|
28
32
|
|
33
|
+
),
|
34
|
+
|
35
|
+
'20140715' => array(
|
36
|
+
|
37
|
+
'1回戦' => array(
|
38
|
+
|
29
|
-
'
|
39
|
+
'0' => array(
|
30
|
-
|
40
|
+
|
31
|
-
'sen_name' => "テスト3",
|
41
|
+
'sen_name' => "テスト3",
|
32
|
-
|
42
|
+
|
33
|
-
'sen_score' =>
|
43
|
+
'sen_score' => 10,
|
34
|
-
|
44
|
+
|
35
|
-
'kou_name' => "テスト4",
|
45
|
+
'kou_name' => "テスト4",
|
36
|
-
|
46
|
+
|
37
|
-
'kou_score' =>
|
47
|
+
'kou_score' => 0,
|
48
|
+
|
49
|
+
),
|
38
50
|
|
39
51
|
),
|
40
52
|
|
53
|
+
'2回戦' => array(
|
54
|
+
|
55
|
+
'0' => array(
|
56
|
+
|
57
|
+
'sen_name' => "テスト5",
|
58
|
+
|
59
|
+
'sen_score' => 11,
|
60
|
+
|
61
|
+
'kou_name' => "テスト6",
|
62
|
+
|
63
|
+
'kou_score' => 20,
|
64
|
+
|
65
|
+
),
|
66
|
+
|
67
|
+
),
|
68
|
+
|
41
69
|
),
|
42
70
|
|
43
|
-
'2回戦' => array(
|
44
|
-
|
45
|
-
'0' => array(
|
46
|
-
|
47
|
-
'sen_name' => "テスト5",
|
48
|
-
|
49
|
-
'sen_score' => 11,
|
50
|
-
|
51
|
-
'kou_name' => "テスト6",
|
52
|
-
|
53
|
-
'kou_score' => 20,
|
54
|
-
|
55
|
-
),
|
56
|
-
|
57
|
-
'1' => array(
|
58
|
-
|
59
|
-
'sen_name' => "テスト7",
|
60
|
-
|
61
|
-
'sen_score' => 80,
|
62
|
-
|
63
|
-
'kou_name' => "テスト8",
|
64
|
-
|
65
|
-
'kou_score' => 11,
|
66
|
-
|
67
|
-
),
|
68
|
-
|
69
|
-
),
|
70
|
-
|
71
71
|
);
|
72
72
|
|
73
73
|
|
@@ -98,90 +98,98 @@
|
|
98
98
|
|
99
99
|
(
|
100
100
|
|
101
|
-
[
|
101
|
+
[ishikawa] => Array
|
102
102
|
|
103
103
|
(
|
104
104
|
|
105
|
-
[
|
105
|
+
[20140716] => Array
|
106
106
|
|
107
107
|
(
|
108
108
|
|
109
|
-
[
|
109
|
+
[1回戦] => Array
|
110
110
|
|
111
111
|
(
|
112
112
|
|
113
|
+
[0] => Array
|
114
|
+
|
115
|
+
(
|
116
|
+
|
113
|
-
[sen_name] => テスト
|
117
|
+
[sen_name] => テスト1
|
114
|
-
|
118
|
+
|
115
|
-
[sen_score] =>
|
119
|
+
[sen_score] => 10
|
116
|
-
|
120
|
+
|
117
|
-
[kou_name] => テスト
|
121
|
+
[kou_name] => テスト2
|
118
|
-
|
122
|
+
|
119
|
-
[kou_score] =>
|
123
|
+
[kou_score] => 0
|
124
|
+
|
125
|
+
)
|
126
|
+
|
127
|
+
|
120
128
|
|
121
129
|
)
|
122
130
|
|
123
131
|
|
124
132
|
|
133
|
+
)
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
[20140715] => Array
|
138
|
+
|
139
|
+
(
|
140
|
+
|
125
|
-
[
|
141
|
+
[2回戦] => Array
|
126
142
|
|
127
143
|
(
|
128
144
|
|
145
|
+
[0] => Array
|
146
|
+
|
147
|
+
(
|
148
|
+
|
129
|
-
[sen_name] => テスト
|
149
|
+
[sen_name] => テスト5
|
130
|
-
|
150
|
+
|
131
|
-
[sen_score] => 1
|
151
|
+
[sen_score] => 11
|
132
|
-
|
152
|
+
|
133
|
-
[kou_name] => テスト
|
153
|
+
[kou_name] => テスト6
|
134
|
-
|
154
|
+
|
135
|
-
[kou_score] => 0
|
155
|
+
[kou_score] => 20
|
156
|
+
|
157
|
+
)
|
158
|
+
|
159
|
+
|
136
160
|
|
137
161
|
)
|
138
162
|
|
139
163
|
|
140
164
|
|
165
|
+
[1回戦] => Array
|
166
|
+
|
167
|
+
(
|
168
|
+
|
169
|
+
[0] => Array
|
170
|
+
|
171
|
+
(
|
172
|
+
|
173
|
+
[sen_name] => テスト3
|
174
|
+
|
175
|
+
[sen_score] => 10
|
176
|
+
|
177
|
+
[kou_name] => テスト4
|
178
|
+
|
179
|
+
[kou_score] => 0
|
180
|
+
|
181
|
+
)
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
)
|
186
|
+
|
187
|
+
|
188
|
+
|
141
189
|
)
|
142
190
|
|
143
191
|
|
144
192
|
|
145
|
-
[2回戦] => Array
|
146
|
-
|
147
|
-
(
|
148
|
-
|
149
|
-
[1] => Array
|
150
|
-
|
151
|
-
(
|
152
|
-
|
153
|
-
[sen_name] => テスト7
|
154
|
-
|
155
|
-
[sen_score] => 80
|
156
|
-
|
157
|
-
[kou_name] => テスト8
|
158
|
-
|
159
|
-
[kou_score] => 11
|
160
|
-
|
161
|
-
)
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
[0] => Array
|
166
|
-
|
167
|
-
(
|
168
|
-
|
169
|
-
[sen_name] => テスト5
|
170
|
-
|
171
|
-
[sen_score] => 11
|
172
|
-
|
173
|
-
[kou_name] => テスト6
|
174
|
-
|
175
|
-
[kou_score] => 20
|
176
|
-
|
177
|
-
)
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
)
|
182
|
-
|
183
|
-
|
184
|
-
|
185
193
|
)
|
186
194
|
|
187
195
|
|