Code has been added to clipboard!

Looping Trough Attribute Values in XML Files

Example
<?php
  $xml = simplexml_load_file('bookstore.xml') or die('Failed to create an object');
  foreach($xml->children() as $books) {       	
    echo $books->name['lang'];    
    echo "<br>"; 
  }
?>