<?
	require_once('db.php');
	$query = "select * from meny";
	$result = mysql_query($query);
	global $dataset = array();

	while($line = mysql_fetch_array($result))
		$dataset[] = $line;

	function spawnChildren($parent)
	{
		// return an array containing all the ids which have $parent as parent
	}

	function findParentID($parent)
	{
		foreach($dataset as $data)
		{
			if($data['
		}
	}


	// add this as a new element in this parent
	$hierset = spawnChildren($dataset, 0);
	print_r($hierset);
//	print_r($dataset);
?>
