Merge SimpleXML Arrays

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rossmurphy
Forum Newbie
Posts: 5
Joined: Thu Jun 11, 2009 10:33 am

Merge SimpleXML Arrays

Post by rossmurphy »

I have these two simple XML elements, they both contain the same attributes. I need to merge them into a single xmlobject. Is this possible?

Code: Select all

SimpleXMLElement Object ( [@attributes] => Array ( [configId] => 9 [denominations] => 0.05, 0.25, 0.5, [gameCurrency] => GBP [gameName] => 7s Ablaze (5 Line) [gameSource] => parlay [gameType] => SL [maxBet] => 0.5 [maxCoins] => 0 [minBet] => 0.05 [minCoins] => 1 [screenName] => 7s Ablaze (5 Line) [style] => BLA5 ) )
 
SimpleXMLElement Object ( [@attributes] => Array ( [configId] => 1 [denominations] => null [gameCurrency] => GBP [gameName] => MonsterCarlo [gameSource] => Orbis [gameType] => MC [maxBet] => 0.0 [maxCoins] => 0 [minBet] => 0.0 [minCoins] => 0 [screenName] => Monster Carlo [style] => ORBIS ) )
Post Reply