I am retrieving a huge string from the WoW Armory API using:
$allAchievements = file_get_contents('http://us.battle.net/api/wow/data/character/achievements');
That returns this:
http://us.battle.net/api/wow/data/character/achievements
I am trying to convert this into a manageable format such as an array that would look similar to:
[achievements]=> array
(
[0]=> Array
(
[id]=>6,
[title]=>Level 10,
[points]=>10,
[description]=>Reach Level 10.,
[rewardItems]=>[],
[icon]=>achievement_level_10,
[criteria]=>[],
[accountWide]=>false,
[factionId]=>2,
)
[1]=> Array
(
[id]=>7,
[title]=>Level 20,
[points]=>10,
[description]=>Reach Level 20.,
[rewardItems]=>[],
[icon]=>achievement_level_20,
[criteria]=>[],
[accountWide]=>false,
[factionId]=>2,
)
...
)
I have tried numerous combinations of explode() and parse_str() but i haven't been able to create any kind of array that would prove to be any use to me.
Is there a way to use file_get_contents(); so that a array would be returned in stead of a string?
If not, where should i start to expand this huge string into a manageable array?
Thank You for any help!