使用以下代码我收到错误“为foreach()提供的无效参数”
$apifr = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=".$steamkey."&steamids=".$id_banuser."&avatar";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$apifr);
$result=curl_exec($ch);
$result = json_decode($result);
$result = $result->response->players;
foreach($result as $r){
echo $r->avatarfull;
}
curl_close($ch);
接受所有建议:)