PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alexander Kiryukhin  >  YLS Parser  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Usage example file
Class: YLS Parser
Parse and generate data structures in YLS files
Author: By
Last change:
Date: 3 years ago
Size: 657 bytes
 

Contents

Class file image Download
<?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);