回答編集履歴
1
二つ目のコード例の添字指定にミスがあったのを修正
test
CHANGED
@@ -22,6 +22,6 @@
|
|
22
22
|
|
23
23
|
$index = rand(0, count($test_json['array']) - 1);
|
24
24
|
|
25
|
-
$img_path = $test_json[$index]['img_path'];
|
25
|
+
$img_path = $test_json['array'][$index]['img_path'];
|
26
26
|
|
27
27
|
```
|