PHP Classes

File: dhtmldumpexample.php

Recommend this page to a friend!
  Packages 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: 19 years ago
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->a = microtime();
        }
        
        public function addObject ($obj){
            $this->c [] = $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>