PHP Classes

File: GeoExample.php

Recommend this page to a friend!
  Classes of stefano dolzi   Tree   GeoExample.php   Download  
File: GeoExample.php
Role: Example script
Content type: text/plain
Description: Example n.2
Class: Tree
Simple Tree Class
Author: By
Last change: *
Date: 21 years ago
Size: 882 bytes
 

Contents

Class file image Download
<?
include "TreeClass.php";

?>

<BODY BGCOLOR="GRAY">
<H1 align="center"><FONT COLOR="NAVY"> Example of Territorial Hierarchy </FONT> </H1>
<?

/* Create a tree of regions and cities of Italy and Spain*/
$arbre=new Tree;
$arbre->AddNode("Lombardy","Italy");
$arbre->AddNode("Latium","Italy");
$arbre->AddNode("Sicily","Italy");
$arbre->AddNode("Milan","Lombardy");
$arbre->AddNode("Varese","Lombardy");
$arbre->AddNode("Rome","Latium");
$arbre->AddNode("Frosinone","Latium");
$arbre->AddNode("Palermo","Sicily");
$arbre->AddNode("Catania","Sicily");
$arbre->AddNode("Andalusia","Spain");
$arbre->AddNode("Catalonia","Spain");
$arbre->AddNode("Granada","Andalusia");
$arbre->AddNode("Sevilla","Andalusia");
$arbre->AddNode("Barcelona","Catalonia");
$arbre->AddNode("Terragona","Catalonia");


/* Draw tree */

$arbre->drawTree();



?>
</BODY>