【发布时间】:2022-01-10 17:09:32
【问题描述】:
我想获取子数组中的“single_img”的值,但是找不到方法
$video ='{"msg":"OK","server_time":"2021-12-04 20:33:26","status":200,"result":[{"single_img":"8eybbqf5nnta6vcw.jpg","file_code":"vg1fkuag1tsa","splash_img":"8eybbqf5nnta6vcw.jpg","canplay":1,"views":"0","length":"2370","uploaded":"2021-12-04 13:28:35","title":"(Hands On Ed Class \/ 12.04.2021)"}]}';
$do = json_decode($video);
echo json_encode($do);
$result= json_encode($do->result);
echo json_encode($result->single_img);
感谢您的回答
【问题讨论】:
-
点赞so