1--TEST-- 2SimpleXML [profile]: Accessing an array of subnodes 3--EXTENSIONS-- 4simplexml 5--FILE-- 6<?php 7$root = simplexml_load_string('<?xml version="1.0"?> 8<root> 9 <child>Hello</child> 10 <child>World</child> 11</root> 12'); 13 14foreach ($root->child as $child) { 15 echo "$child "; 16} 17echo "\n---Done---\n"; 18?> 19--EXPECT-- 20Hello World 21---Done--- 22