mirror of
https://github.com/php/php-src.git
synced 2024-10-20 16:02:44 +00:00
7f5b508f26
This will be expanded as issues arise and will be a formal definition (in code) of simplexml's behaviour.
22 lines
380 B
PHP
22 lines
380 B
PHP
--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---
|