php-src/ext/simplexml/examples/book.php
2003-06-09 04:01:11 +00:00

9 lines
181 B
PHP

<?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";
}
?>