Location: PHPKode > scripts > Tree > tree/GeoExample.php
<?
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>
Return current item: Tree