我有以下代码:
$images = array();
foreach ($media->data as $data) {
$images['src'] = $data->images->thumbnail->url;
$images['user'] = $data->user->username;
$images['time'] = $data->created_time;
}
echo json_encode(array(
'next_id' => $pagination->next_page,
'images' => array('src' => $images['src'], 'user' => $images['user'], 'time' => $images['time'])
));
我希望它显示所有字段,但它只输出一个。如何让 Ccn 显示 json 输出中的所有字段?
谢谢你。