I've been trying to scrape json data from a remote URL (another site from a game) and I can't seem to figure this bit out The json data is structured like TotalPoints TotalGroups GroupStandings --RANK -> 1 --POINTS ->123,123,120 --GroupName ->AlphaDogs --GroupID -> 12348 --RANK -> 2 --POINTS -> 123,120 --GroupName ->OmegaDogs --GroupID -> 40534 I need to grab the entire entry from 'Rank' to 'GroupName' based on the group ID I enter into my script. Can anyone help me or guide me? Been going crazy over this. I want to do this with just php but if I can't do i need to look into javascript or json?
Is the data a json string (http://us3.php.net/manual/en/function.json-decode.php) or a php array variable?
sorry meant to say that I converted the json to an array. But I'm also able to just define some parts to get exactly what I need without making it an array. I figured more people are familiar with arrays and so I'd be able to get a faster answer if I said Array in the title and displayed my data as an array. I can grab GroupStandings and list them as an array or list just 1 according to the number it is in the array [0] [1] [2] but this will always change in the json data so I need to be able to grab the data via a value like the GroupName or GroupID and desplay the entire entry for just one group.