Would anyone be willing to help me figure out how I can retrieve the franchise name from the second XML page using the franchise id?
I am working with two different pages. The first page will get me a list of the franchise ids. I would like to be able to get the franchise name from the second XML page by using the franchise id from the first page.
Let me know if you need more information, in order to be able to help.
I am looking for an answer in PHP.
PHP: Parsing first XML page
$url = "XMLPAGEURL";
$xml = simplexml_load_file($url);
foreach ($xml->franchise as $franchise) {
echo ''.$franchise[id].'';
}
Second XML page
<league id="1"/>
<franchises count="5">
<franchise name="A" id="0001"/>
<franchise name="B" id="0002"/>
<franchise name="C" id="0003"/>
<franchise name="D" id="0004"/>
<franchise name="E" id="0005"/>
</franchises>
</league>