iterate_xmls.php

<?php $xml = simplexml_load_file("file.xml"); $xmlName = $xml->getName(); foreach ($xml->children() as $child) { foreach ($child->children() as $grandson) { if ($grandson == "tag1") { } if ($grandson == "tag2") { } } } ?>
Iterate XMLs

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.