Hello all, here is the code im using:


 *	phpTreeGraph
 *	Linux filesystem hierarchy demo
  * 	@author Mathias Herrmann

//include GD rendering class

//create new GD renderer, optinal parameters: LevelSeparation,  SiblingSeparation, SubtreeSeparation, defaultNodeWidth, defaultNodeHeight
$objTree = new GDRenderer(30, 10, 30, 50, 20);

//add nodes to the tree, parameters: id, parentid optional text, width, height, image(path)
$objTree->add(1,0,'/', 10);
$objTree->add(8,1,'lost+found', 100);
$objTree->add(26,14,'X11 R6');


$objTree->setBGColor(array(255, 255, 255));
$objTree->setNodeColor(array(0, 128, 255));
$objTree->setLinkColor(array(0, 64, 128));
$objTree->setNodeBorder(array(0, 128, 255), 2);
$objTree->setFTFont('./fonts/Vera.ttf', 10, 0, GDRenderer::CENTER|GDRenderer::TOP);



This is from a demo page. What I am attempting to do is fill in the parameters of $objTree->add, with values from an array.
Just as the example above, there would need to be multiple variables created with each id, parentid, etc.

I am using this for my array:

$q = ("SELECT id, first_name, last_name, email, primary_phone, parentID FROM members WHERE parentID = {$_SESSION['id']}");
$r = @mysqli_query ($dbc, $q);

Any help would be greatly appreciated! I have spent days on this with no luck at all.

ah, and just to clarify a little about the above post.

I want to create varibles such as:


being the result of the query.

Since there would be alot of results, it would end up creating alot of the above function. I just don't exactly know how to do it. Thanks again all!