Jump to content

How to mix two arrays?


etrader

Recommended Posts

That depends on what you have in your xml files. You might get away with casting your SimpleXMLElements as arrays and then do the things you need. But if you need to get specific information from your dom tree you should just traverse it and add that information in array.

 

You could also extend SimpleXMLElement and create some kind of method to get the type of array that you need. And use the extended class when you load the file like this: simplexml_load_file('file1.xml', 'extendedSimpleXMLElement');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.