PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Diogo Resende   Diagram   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Loads class and creates a diagram
Class: Diagram
Draw an hierarchic diagram from an array
Author: By
Last change:
Date: 20 years ago
Size: 774 bytes
 

Contents

Class file image Download
<?php
 
include "class.diagram.php";

 
$g = new Diagram();

 
$arr = array('this' => array('is' => array('just' => array('a'),
                                               
'test'),
                              
'to' => array('test' => array('my',
                                                               
'new' => array('class',
                                                                               
'called'),
                                                               
'diagram')),
                              
'graph'));
 
 
$g->SetRectangleBorderColor(124, 128, 239);
 
$g->SetRectangleBackgroundColor(194, 194, 239);
 
$g->SetFontColor(255, 255, 255);
 
$g->SetBorderWidth(0);
 
$g->SetData($arr);
 
$g->Draw();
?>