Basically, I'm working with 2 API's in which I want to integrate inside one file, one of the API returns a JSON Array. The other returns an XML.
Here's the idea in which I want to be able to do
$arr = (array)file_get_contents(JSON API);
$arr2 = (array)simplexml_load_file("XML API");
$details['Details']['1'] = $arr['Details']['0'];
$details['Details']['2'] = $arr2['Details']['0'];
foreach($details['Details'] as $detail) {
//do what i want with the array
}
But how can I get the JSON API inside this Array ? I'm sorry if it's hard to understand what I'm asking but it's the best I can explain.
there is a way to convert the JSON to an XML Document ?