Login   Register  
PHP Classes
elePHPant
Icontem

File: dhtmldumpexample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ian Lord  >  DHTMLDump  >  dhtmldumpexample.php  >  Download  
File: dhtmldumpexample.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: DHTMLDump
Display a variable in collapsible tree
Author: By
Last change:
Date: 2007-09-05 03:23
Size: 784 bytes
 

Contents

Class file image Download
<?php
    
    
require_once('class/class.treeview.php');
    require_once(
'class/class.dhtmldump.php');
    
    class 
test {
        public 
$a;
        protected 
$b = array (1,2,3);
        private 
$c = array();
        
        public function 
__construct(){
            
$this->microtime();
        }
        
        public function 
addObject ($obj){
            
$this->[] = $obj;
        }
    }
?>
<html>
    <head>
        <title>Treeview example</title>
        <link href="css/treeview.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/treeview.js"></script>
    </head>
    <body style="background-color:#dedad9">
        <?php  $a = new test ();
    
$b = array(
        
'a' => array (1,2,3,4),
        
'b' => 1,
        
'c' => 'xxx',
        
'd' => null,
        
'e' => 1.222
    
);
    
$a->addObject($a$b, new test());
    
?>
        <?php echo DHTMLDump::dumpVariable($a,0,0,7?>
    </body>
</html>