OK, here's what I'm trying to do. I am trying to parse the blog-getentries XML that is displaying a user's info for all days in their current streak. The info I want is the the greatest gamerscore increase and the date during the streak.
I tried this first:
for ($counter = 0; $counter < $profilexml->info->dayplayed; $counter++)
{
if ($daysplayedxml->blog->entry[$counter]->gsincrease > $biggestgsinc)
{
$biggestgsinc = $daysplayedxml->blog->entry[$counter]->gsincrease;
$datebiggestgsinc = $daysplayedxml->blog->entry[$counter]->date;
}
}$biggestgsinc has already been set to 0 and $profilexml->info->dayplayed is the number of days in the user's current streak.
Then I tried this:
foreach ($daysplayedxml->blog->entry as $points)
{
if ($points->gsincrease > $biggestgsinc)
{
$biggestgsinc = $points->gsincrease;
$datebiggestgsinc = $points->date;
}
}Neither way works and actually both give the same wrong answer. I'm sure it's something simple I'm overlooking so if anyone can give me a push in the right direction, I'd appreciate it.