PHP Classes

File: examples/InnerValueManiplulations.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   PHP Dictionary to Array class   examples/InnerValueManiplulations.php   Download  
File: examples/InnerValueManiplulations.php
Role: Example script
Content type: text/plain
Description: example script
Class: PHP Dictionary to Array class
Manipulate value collections as arrays or objects
Author: By
Last change:
Date: 6 years ago
Size: 3,032 bytes
 

Contents

Class file image Download
<?php
require_once('./../xdict.class.php');
echo
'<pre>';
highlight_string('<?php

$pushcol=xdict(1,\'\',false);
$pushcol->pushColumn(\'papa\',range(0,4));
$pushcol->pushColumn(\'maman\',range(4,0));
$pushcol->pushColumn(\'isaac\',range(\'a\',\'e\',1));
$pushcol->pushColumn(\'testlast\',range(4,9));
$pushcol->pushColumn(\'testlast\',range(0,4));//change testlast column val
$pushcol->pushColumn(\'papa\',range(4,0));//change papa column val
$pushcol->pushColumn(0,range(4,0));
$pushcol->pushColumn(1,range(4,0));


$pushcol->SetInnerVal(\'[1]["papa"]["new"]\',\'kaka\');
$pushcol->SetInnerVal(\'[1]["papa"][null]\',\'kaka\');
$pushcol->SetInnerVal(\'[1]["papa"][1]\',\'kaka\');
$pushcol->SetInnerVal(\'[1]["papa"][2]\',range(1,6));
$pushcol->SetInnerVal(\'[1]["papa"][1][5]["test"]\',range(1,6));
$pushcol->SetInnerVal(\'[1]["maman"]\',0123457698);
$pushcol->SetInnerVal(\'[1]["papa"][2][5]\',xdict());
$pushcol->SetInnerVal(\'[1]["papa"][2][5][]\',range(1,6));
$pushcol->SetInnerVal(\'[1]["papa"][2][5][2]\',xdict());
$pushcol->SetInnerVal(\'[1]["papa"][2][5][2][1]\',xdict());
$pushcol->SetInnerVal(\'[1]["papa"][2][5][2][1][5]\',xdict());
$pushcol->SetInnerVal(\'["hoho"]\',\'kakao\');


$pushcol->column(\'papa\')->print_xr();

$pushcol->UnsetInnerVal(\'[1]["papa"]\');

$pushcol->column(\'papa\')->print_xr();


$pushcol->UnsetColumn(\'papa\');

$pushcol->column(\'papa\')->print_xr();

$pushcol->UnsetColumn(0);
$pushcol->UnsetColumn(1);
$pushcol->UnsetColumn(\'maman\');
$pushcol->UnsetColumn(\'testlast\');
$pushcol->print_xr();
?>'
);


$pushcol=xdict(1,'',false);
$pushcol->pushColumn('papa',range(0,4));
$pushcol->pushColumn('maman',range(4,0));
$pushcol->pushColumn('isaac',range('a','e',1));
$pushcol->pushColumn('testlast',range(4,9));
$pushcol->pushColumn('testlast',range(0,4));//change testlast column val
$pushcol->pushColumn('papa',range(4,0));//change papa column val
$pushcol->pushColumn(0,range(4,0));
$pushcol->pushColumn(1,range(4,0));


$pushcol->SetInnerVal('[1]["papa"]["new"]','kaka');
$pushcol->SetInnerVal('[1]["papa"][null]','kaka');
$pushcol->SetInnerVal('[1]["papa"][1]','kaka');
$pushcol->SetInnerVal('[1]["papa"][2]',range(1,6));
$pushcol->SetInnerVal('[1]["papa"][1][5]["test"]',range(1,6));
$pushcol->SetInnerVal('[1]["maman"]',0123457698);
$pushcol->SetInnerVal('[1]["papa"][2][5]',xdict());
$pushcol->SetInnerVal('[1]["papa"][2][5][]',range(1,6));
$pushcol->SetInnerVal('[1]["papa"][2][5][2]',xdict());
$pushcol->SetInnerVal('[1]["papa"][2][5][2][1]',xdict());
$pushcol->SetInnerVal('[1]["papa"][2][5][2][1][5]',xdict());
$pushcol->SetInnerVal('["hoho"]','kakao');


$pushcol->column('papa')->print_xr();

$pushcol->UnsetInnerVal('[1]["papa"]');

$pushcol->column('papa')->print_xr();

$pushcol->UnsetColumn('papa');

$pushcol->column('papa')->print_xr();

$pushcol->UnsetColumn(0);
$pushcol->UnsetColumn(1);
$pushcol->UnsetColumn('maman');
$pushcol->UnsetColumn('testlast');
$pushcol->print_xr();
?>