Back to index

php5  5.3.10
book.php
Go to the documentation of this file.
00001 <?php
00002 $books = simplexml_load_file('book.xml');
00003 //var_dump($books);
00004 $books = $books->book;
00005 foreach ($books as $book) {
00006        echo "{$book->title} was written by {$book->author}\n";
00007 }
00008 ?>