Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2004-04-24 09:47
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(124128239);
  
$g->SetRectangleBackgroundColor(194194239);
  
$g->SetFontColor(255255255);
  
$g->SetBorderWidth(0);
  
$g->SetData($arr);
  
$g->Draw();
?>