<?php
require_once('./../xdict.class.php');
echo '<pre>';
highlight_string('<?php
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,\'k\',true,true,4)));
print_r($a->reverse());
print_r($a->flip());
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,\'k\',true,true,4),"j"=>"banana","k"=>"banana"));
print_r($a->flip());
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,\'k\',true,true,4),"j"=>"banana","k"=>"banana"));
$a->flip(false)->print_xr();
$y=xdict(0,\'k\');
for ($i=0;$i<3;$i++){
$y[]=$i*3;
}
$y->shuffle();// preserve keys
$y->print_xr();
$y->shuffle(false);//re-index
$y->print_xr();
?>');
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,'k',true,true,4)));
print_r($a->reverse());
print_r($a->flip());
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,'k',true,true,4),"j"=>"banana","k"=>"banana"));
print_r($a->flip());
$a=xdict(0,"",false);
$a->fill_with(array("d"=>"avocado", "e"=>"apple", "f"=>"banana","i"=>xdict(0,'k',true,true,4),"j"=>"banana","k"=>"banana"));
$a->flip(false)->print_xr();
$y=xdict(0,'k');
for ($i=0;$i<10;$i++){
$y[]=$i*3;
}
$y->shuffle();// preserve keys
$y->print_xr();
$y->shuffle(false);//re-index
$y->print_xr();
?>
|