質問編集履歴
7
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
### ソースコード
|
34
34
|
|
35
|
-
```h
|
35
|
+
```php
|
36
36
|
|
37
37
|
<?php
|
38
38
|
|
6
コードを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,174 +32,176 @@
|
|
32
32
|
|
33
33
|
### ソースコード
|
34
34
|
|
35
|
+
```html
|
36
|
+
|
37
|
+
<?php
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
$file = file_get_contents('imgdata.json');
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
$json = json_decode($file);
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
?>
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
<!DOCTYPE html>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<html>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<head>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<meta charset="UTF-8">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<title>jsonkadai</title>
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</head>
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<body>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<table>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<tr>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<?php foreach ($json->items as $item) :?>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<td>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<a href="<?php print($item->path); ?>"><img src="<?php print($item->path); ?>"></a>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
</td>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<?php
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
endforeach;
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
?>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</tr>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
</table>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
</body>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</html>
|
158
|
+
|
35
159
|
```
|
36
160
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<body>
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<table>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<tr>
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<?php foreach ($json->items as $item) :?>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<td>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<a href="<?php print($item->path); ?>"><img src="<?php print($item->path); ?>"></a>
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</td>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
<?php
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
endforeach;
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
?>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</tr>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
</table>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</body>
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
</html>
|
161
|
+
|
162
|
+
|
163
|
+
json内容
|
164
|
+
|
165
|
+
```json
|
166
|
+
|
167
|
+
{
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
"items":[
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
{
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
"title":"img1",
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
"path":"json/json/img/img1.png"
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
},
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
{
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
"title":"img2",
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
"path":"json/json/img/img2.png"
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
},
|
204
|
+
|
205
|
+
以下img.png99まで同様のが続く…
|
158
206
|
|
159
207
|
```
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
json内容
|
164
|
-
|
165
|
-
```{
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
"items":[
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
{
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
"title":"img1",
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
"path":"json/json/img/img1.png"
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
},
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
{
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
"title":"img2",
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
"path":"json/json/img/img2.png"
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
},
|
202
|
-
|
203
|
-
以下img.png99まで同様のが続く…
|
204
|
-
|
205
|
-
```
|
5
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
###
|
1
|
+
### 実現したいこと
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
-
jsonフォルダで読み込んだもの(中には画像100こ入っています)をテーブルタグで表示して8列の画像を作りたい
|
5
|
+
jsonフォルダで読み込んだもの(中には画像100こ入っています)をテーブルタグで表示して8列の画像を作りたい
|
6
|
+
|
7
|
+
|
8
|
+
|
6
|
-
|
9
|
+
###問題点
|
10
|
+
|
11
|
+
|
12
|
+
|
7
|
-
読み込んだ後、表示する所まではできたのですが、列にする工程がなかなか上手くい
|
13
|
+
読み込んだ後、表示する所まではできたのですが、列にする工程がなかなか上手くいきません
|
8
14
|
|
9
15
|
![イメージ説明](80cbaa01c4e557c730a9f23752f22acc.jpeg)
|
10
16
|
|
@@ -24,6 +30,8 @@
|
|
24
30
|
|
25
31
|
|
26
32
|
|
33
|
+
### ソースコード
|
34
|
+
|
27
35
|
```
|
28
36
|
|
29
37
|
<?php
|
4
文法修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -152,6 +152,8 @@
|
|
152
152
|
|
153
153
|
|
154
154
|
|
155
|
+
json内容
|
156
|
+
|
155
157
|
```{
|
156
158
|
|
157
159
|
|
3
jsonの中身を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -149,3 +149,47 @@
|
|
149
149
|
</html>
|
150
150
|
|
151
151
|
```
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
```{
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
"items":[
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
{
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
"title":"img1",
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
"path":"json/json/img/img1.png"
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
},
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
{
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
"title":"img2",
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
"path":"json/json/img/img2.png"
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
},
|
192
|
+
|
193
|
+
以下img.png99まで同様のが続く…
|
194
|
+
|
195
|
+
```
|
2
コードを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,9 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
```
|
28
|
+
|
27
|
-
|
29
|
+
<?php
|
28
30
|
|
29
31
|
|
30
32
|
|
@@ -116,4 +118,34 @@
|
|
116
118
|
|
117
119
|
|
118
120
|
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
?>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</tr>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
</table>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</body>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
</html>
|
150
|
+
|
119
151
|
```
|
1
タイトル修正 初心者アイコン
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
画像を特定の枚数を貼った後に改行させたい
|
test
CHANGED
File without changes
|