Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <features>
- <name>Holy moly</name>
- ....
- </features>
- <features>
- <name>what the...</name>
- ...
- </features>
- <?php
- include 'example.php';//heres my xml content
- $features = new SimpleXMLElement($xmlstr);
- /* For each <character> node, we echo a separate <name>. */
- foreach ($features->properties as $properties) {
- echo "<br />".$properties->name, ' played by ', $properties->website, PHP_EOL;
- }
- ?>
- foreach ($root->features as $features) {
- foreach ($features->properties as $properties) {
- echo "<br />".$properties->name, ' played by ', $properties->website, PHP_EOL;
- } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement