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