不确定如何修复此错误
注意:未定义的偏移量:第 50 行的 C:\xampp\htdocs\streams.php 中的 0 注意:未定义的偏移量:第 53 行的 C:\xampp\htdocs\streams.php 中的 0 注意:未定义的偏移量:C:\ 中的 0第 54 行的 xampp\htdocs\streams.php
代码其指的是:
<?php
$members = array("hawkmyg");
$userGrab = "http://api.justin.tv/api/stream/list.json?channel=";
$checkedOnline = array ();
foreach($members as $i =>$value){
$userGrab .= ",";
$userGrab .= $value;
}
unset($value);
//grabs the channel data from twitch.tv streams
$json_file = file_get_contents($userGrab, 0, null, null);
$json_array = json_decode($json_file, true);
//get's member names from stream url's and checks for online members
foreach($members as $i =>$value){
$title = $json_array[$i]['channel']['channel_url'];
$array = explode('/', $title);
$member = end($array);
$viewer = $json_array[$i] ['stream_count'];
onlinecheck($member, $viewer);
$checkedOnline[] = signin($member);
}
无法弄清楚如何修复