echoing simplexml problems
I have a simpleXML object that I use addChild on then use a foreach loop to echo out specific node values.
Before the addChild is performed the simpleXml gets the data just fine. Afterwards The data from the foreach will echo nothing and it will iterate through 3 times when there is only 2 nodes to loop through.
if I run a print_r() on my simpleXml object before I run my foreach, bam problem solved. turn off the print_r() and the problem returns.
do I need to parse my data as a string for the echo? It works fine until the addChild method is run.
I have checked my xml with nodes and all to make sure that all the nodes were there as they should be, so this is not the problem.