summaryrefslogtreecommitdiff
path: root/ext/simplexml/examples/book.php
blob: 0416df861b4b2921d0ba0c55637794246e6be853 (plain)
1
2
3
4
5
6
7
8
<?php
$books = simplexml_load_file('book.xml');
//var_dump($books);
$books = $books->book;
foreach ($books as $book) {
	echo "{$book->title} was written by {$book->author}\n";
}
?>