if (preg_match('/"percentDone":[0-9.]+/i', $result[0], $matches))
$temp = str_replace('"id":', "", $matches[0]);
// $temp="hlDr1wqu2ONtM3McVGHoVzfrkp2UgUcGwDt66IuxAe0 LBkru";
$id[0] = $temp;
change to:
$temp= array();
if (preg_match('/"percentDone":[0-9.]+/i', $result[0], $matches))
$temp = str_replace('"id":', "", $matches[0]);
// $temp="hlDr1wqu2ONtM3McVGHoVzfrkp2UgUcGwDt66IuxAe0 LBkru";
$id[0] = $temp;
Lock Down Reviewed by Lock Down on . [PHP] Notice: Undefined offset: 0 Error. Hello, i am new coding. I am working on a auto downloading torrent php script. I have been stucked with Undefined offset error. Your help will be very appretiated, thanks. :) Notice: Undefined offset: 0 in /var/www/html/torrent/bgrahul.php on line 351 Notice: Undefined offset: 0 in /var/www/html/torrent/bgrahul.php on line 363 Marked those lines to bold and red. Rating: 5