дерево заполняется из БД:
<div class="panel">
<div id="tree" class="tree">
<ul>
<?php
foreach($courses as $course_row)
{
?>
<li><a class="course" id="<?=$course_row->course_id?>" href="#"><?echo $course_row->course_title?></a>
<ul>
<? foreach($section_to_course as $row_StC)
{
if($course_row->course_id == $row_StC->course_id)
{
foreach($sections as $section_row)
if($section_row->section_id == $row_StC->section_id)
{
?>
<li><a class="section" id="<?=$section_row->section_id?>" href="#"><?echo $section_row->section_title?></a>
<ul>
<? foreach($test_to_section as $row_TtS)
{
if($section_row->section_id == $row_TtS->section_id)
{
foreach($tests as $test_row)
if($test_row->test_id == $row_TtS->test_id)
{
?>
<li><a class="test" id="<?=$test_row->test_id?>" href="#"><?echo $test_row->test_title?></a>
</li>
<?
}
}
}
?>
</ul>
</li>
<?
}
}
}
?>
</ul>
</li>
<?
}
?>
</ul>
</div>
<div id="content">www</div>
</div>