xarxaprod-wp-theme/vendor/wp-cli/mustangostang-spyc/examples/yaml-load.php

22 lines
390 B
PHP
Raw Permalink Normal View History

2024-01-09 16:13:20 +01:00
<?php
#
# S P Y C
# a simple php yaml class
#
# license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
#
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>';