How To Use

Thank ya, an if statement totally slipped my mind O.o
Reply Quote
How would you go about gathering the information for number of points spent in each tree?

foreach($json->talents as $p) {
if ($p->selected == "true") {
$primary = $p->name;
$primaryBuild = $p->build;
$primaryIcon = $p->icon;

foreach($p->trees as $t) {
$primaryTree = $t->total;
}
} else {
$secondary = $p->name;
$secondaryBuild = $p->build;
$secondaryIcon = $p->icon;

foreach($p->trees as $t) {
$secondaryTree = $t->total;
}
}
}

Is just returning the number of points spent in the third tree. I apologize for so many questions, I'm still new to this. The information you all have given me as helped tonnes there is just a few things that come up that I can't quite figure out.
Reply Quote
85 Night Elf Druid
0
$i=0;
foreach($p->trees as $t) {
$secondaryTree[i] = $t->total;
$i=$i+1;
}


The reason you're only getting the third is cause it's over writing itself each time, so instead store it as a array. Then you know
$secondaryTree[0] = <some number>
$secondaryTree[1] = <second branch number>
etc.
Edited by Kieble on 7/26/2012 9:08 AM PDT
Reply Quote
Thanks again Kieble! :)
Reply Quote
90 Tauren Shaman
9260
I am also new to JSON. Does anyone have any advice on how to pull the API through jscript or, if possible, html/css?

XML/XLS is undesirable, but any of the above would be great.

Thanks!

If it helps, the only feed I would want is this: http://us.battle.net/api/wow/guild/Kil%27Jaeden/Skeletons%20of%20society?fields=news
Edited by Nokosa on 8/6/2012 9:28 AM PDT
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)

Reported!

[Close]