<?php
include "yls.class.php";
$yls = new YLS();
print "\nFrom 'test.yls']-------------------------------------------------\n";
$result = $yls->fromFile("test.yls");
print_r($result);
print "\nFrom PHP array]---------------------------------------------------\n";
$array = array(
'one'=>'key1',
'two'=>array('kk',array('kk','ll','mm'),'mm'),
'three'=> array (
'key1'=>'value1',
'key2'=>'value2'
),
'four'=>'key4'
);
$sResult = $yls->fromArray($array);
print "\n$sResult";
print "\nFrom string]------------------------------------------------------\n";
$result = $yls->fromString($sResult);
print_r($result);
|