Back to 'AJAX Tree Menu with PHP - Revisited'
Select the arrows next to the option names to expand and collapse options. Selecting a checkbox will expand on option but will not collapse it.

 

Click to Expand/Collapse OptionHome
Click to Expand/Collapse OptionOur Products

 

The above content was generated with the PHP code (and a little bit of CSS and JavaScript):

$ajax_tree_table['0'] = "ffffff";
$ajax_tree_table['1'] = "eeeeee";
$ajax_tree_table['2'] = "e5e5e5";
$ajax_tree_table['3'] = "dddddd";
$ajax_tree_table['4'] = "d5d5d5";
$ajax_tree_table['5'] = "cccccc";

$tree_data = array(
	array(
	url => "",
	parent => "0",
	name => "Home"),
	array(
		url => "",
		parent => "Home",
		name => "About"),
		array(
		url => "",
		parent => "Home",
		name => "Contact"),
	array(
	url => "",
	parent => "0",
	name => "Our Products"),
		array(
		url => "http://www.OpenCrypt.com/",
		parent => "Our Products",
		name => "OpenCrypt"),
			array(
			url => "http://www.OpenCrypt.com/features.php",
			parent => "OpenCrypt",
			name => "Features and Benefits"),
			array(
			url => "http://demo.OpenCrypt.com/",
			parent => "OpenCrypt",
			name => "Demonstration"),
				array(
				url => "http://www.OpenCrypt.com/",
				parent => "Demonstration",
				name => "Another Tier"),
					array(
					url => "http://www.OpenCrypt.com/",
					parent => "Another Tier",
					name => "And Another"),
						array(
						url => "http://www.OpenCrypt.com/",
						parent => "And Another",
						name => "And Another Tier"),
		array(
		url => "http://www.Locked-Area.com/",
		parent => "Our Products",
		name => "Locked Area"),
		array(
		url => "http://www.DirectoryPass.com/",
		parent => "Our Products",
		name => "DirectoryPass")
);

require "ajax_tree.php";
print ajax_tree($tree_data, 1, 1, 1);