]> git.sesse.net Git - xml-template/blobdiff - php7-swig/include.php
Update the PHP SWIG version to PHP 7, with various crash fixes, too.
[xml-template] / php7-swig / include.php
diff --git a/php7-swig/include.php b/php7-swig/include.php
new file mode 100644 (file)
index 0000000..6845d50
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+include("xml-template.php");
+
+$doc = XML_Template_process_file('../xml/included.xml', array(
+       'color' => 'red'
+), false);
+$master = XML_Template_process_file('../xml/master.xml', array(
+       'title' => 'Main HTML title',
+       'h1' => 'Nice heading here',
+       'contents' => $doc
+), true);
+print XML_Template_convert_doc_to_string($master, true);
+?>