Combine two xml PHP

s7riker

New Member
Hy there,I'm trying to combine two or more xml files for better use. Let's say i have two xml files and i want to combine their content before extract their data into a table.\[code\]<table id="rounded-corner"> <tr> <th>Title</th> <th>Download Link</th> <th>Language</th> </tr><?php $xml_request_url = 'file.xml'; $xml = new SimpleXMLElement($xml_request_url, null, true); foreach ( $xml->results->content as $item ) { echo "<tr><td>" . $item->movie . "</td><td><a href="http://stackoverflow.com/questions/10619315/. $item->download .">Download Link</a> </td><td>" . $item->language . "</td></tr>";} ?> </table>\[/code\]Can you guys give me an example of how to do it? I don't want to make tables for each xml file i have.\[code\]<find><base>http://www.mydomain.com</base><results items="2" itemsfound="2"><song> <downloadlink> http://mydomain.com/dldlink.php?lk=43543 </downloadlink> <format> mp3 </format></song><song> <downloadlink> http://mydomain.com/dldlink.php?lk=87798 </downloadlink> <format> mp4 </format> </song> </results> </find>\[/code\]
 
Back
Top