children() as $child) { if ($child->getName() == "prop") { $green = 0; } } foreach ($xmlClass->children() as $child) { if ($child->count() != 0) { $GLOBALS["prop"] = $child["ref"]; dialog($ref,$child); } else{ if ($GLOBALS["prop"] == $ref || substr($ref,0,strlen($GLOBALS["prop"])) == $GLOBALS["prop"] || ($GLOBALS["prop"] == "0" && $ref != "0")) { if($child->getName() == "r") { echo "

". $child . "

\n"; } if ($child->getName() == "url") { echo "". $child . "\n"; } if ($child->getName() == "t") { echo "

". $child . "

\n"; } } } } }