diff options
Diffstat (limited to 'includes/spyc/examples/yaml-load.php')
| -rw-r--r-- | includes/spyc/examples/yaml-load.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/spyc/examples/yaml-load.php b/includes/spyc/examples/yaml-load.php new file mode 100644 index 0000000..3e1a4a7 --- /dev/null +++ b/includes/spyc/examples/yaml-load.php @@ -0,0 +1,25 @@ +<?php + +# +# S P Y C +# a simple php yaml class +# v0.2(.5) +# +# author: [chris wanstrath, chris@ozmm.org] +# websites: [http://www.yaml.org, http://spyc.sourceforge.net/] +# license: [MIT License, http://www.opensource.org/licenses/mit-license.php] +# copyright: (c) 2005-2006 Chris Wanstrath +# + +include('../spyc.php'); + +$array = Spyc::YAMLLoad('../spyc.yaml'); + +echo '<pre><a href="spyc.yaml">spyc.yaml</a> loaded into PHP:<br/>'; +print_r($array); +echo '</pre>'; + + +echo '<pre>YAML Data dumped back:<br/>'; +echo Spyc::YAMLDump($array); +echo '</pre>'; |
