summaryrefslogtreecommitdiff
path: root/ext/simplexml/examples/book.php
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-05-19 18:25:20 +0000
committerDerick Rethans <derick@php.net>2003-05-19 18:25:20 +0000
commitafabd0575c7abd665cf660161aab0b0ac7982452 (patch)
tree173e2f79fcc631f1b8fc4444659c3d96ca0ea06e /ext/simplexml/examples/book.php
parent80824a3d3a6fc2dfc54814124769deebd511db5b (diff)
downloadphp-git-afabd0575c7abd665cf660161aab0b0ac7982452.tar.gz
- Move examples to their own directory
Diffstat (limited to 'ext/simplexml/examples/book.php')
-rw-r--r--ext/simplexml/examples/book.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/simplexml/examples/book.php b/ext/simplexml/examples/book.php
new file mode 100644
index 0000000000..762f855c52
--- /dev/null
+++ b/ext/simplexml/examples/book.php
@@ -0,0 +1,7 @@
+<?php
+$books = simplexml_load_file('book.xml')->book;
+
+foreach ($books as $book) {
+ echo "{$book->title} was written by {$book->author}\n";
+}
+?>