I am knee deep in foreach purgatory right now trying to come up with a way to traverse this XML file (actual XML text below) with PHP(following the XML file content.) What I
Recursion could be beneficial to you here.
children() as $child) { foreach($child->attributes() as $attr => $attrVal) { print $child; if($attrVal == "yes") { display_entities( $child->children() ); } } } } $xmlref = simplexml_load_file("gallerylisting.xml"); display_entities($xmlref->children());