Before I start with my actual question, maybe cleaning up my regexs may be the answer to fixing my arrays.
My Arrays
Code: Select all
preg_match_all("/<a.*? href=\"((.*?).torrent)\".*?>(.*?)<\/a>/i",$inputStream,$torrentlink);
preg_match_all("/<a.*? title=\"Details for (.*?)\">(.*?)<\/a>/i",$inputStream,$torrentname);
preg_match_all("/<td align=\"right\">(.*?)<\/td>/i",$inputStream,$sizeseedleech);
preg_match_all("/<td>((.*?) (.*?))<\/td>/i",$inputStream,$uploaded);$cleanArray[index][badarrayattrib]
The even ugliest thing is the $sizeseedleech array since it pulls 3 values. If I wanted to print the contents of the arrays, I do this.
Code: Select all
for($i = 0; $i <= 29; $i++)
{
echo $torrentlink[1][$i] . "<br>" . $torrentname[1][$i] . "<br>" . $sizeseedleech[1][($i*3)] .
"<br>" . $sizeseedleech[1][($i*3)+1] . "<br>" . $sizeseedleech[1][($i*3)+2] .
"<br>" . $uploaded[1][$i] ."<br><br>";
}Any help would be greatly appriciated! Thanks in advance.