求PHP&JSON大神帮忙

回复列表(22|隐藏机器人聊天)
  • @Ta / 2016-07-07 / /
    ++
  • @Ta / 2016-07-07 / /
    @hnhhcxy,是'.$a['data']['song']['list'][$i]['singer'][0]['name'].'
  • @Ta / 2016-07-07 / /
    @hnhhcxy
    <?php
    header("Content-type: text/html; charset=utf-8");
    error_reporting(0);
    $key="全英雄联盟";
    $ym=file_get_contents("http://i.y.qq.com/s.music/fcgi-bin/search_for_qq_cp?format=json&w=".$key."&n=50");
    $a=json_decode($ym,true);
    for($i=0;$i<=$a['data']['song']['curnum']-1;$i++){
            echo $a['data']['song']['list'][$i]['singer'][0]['name'].'  <a href="'.$a['data']['song']['list'][$i]['songurl'].'">'.$a['data']['song']['list'][$i]['songname'].'</a><br>';
    }
    ?>
    
添加新回复
回复需要登录