Hello friends I am doing project in Yii. where I am using jstree to maintain heirarchy. But at some moment I m getting problem. I hope you guys will help me out.
Please see the problem and thanks in advance.
this is code
<ul>
<li>Chapter 18 New HCO
<?php foreach($data['sidebar2000_data'] as $list){
echo '<ul>';
echo '<li><a>'. $list['section_number'].'</a></li>';
echo '</ul>';
} ?>
</li><li>Chapter 19 Existing HCO
<ul>
<li data-jstree='{ "selected" : true }'><a href="#">Section 19.1 General Requrement</a></li>
<li data-jstree='{ "opened" : true }'>Section 19.2 Means of Egress Components
<ul>
<li>Section 19.2.1 General</li>
<li>Section 19.2.2 Means of Egress Com</li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Chapter 20 New Amulatory HCO</a></li>
<li><a href="#">Chapter 21 Existing Amulatory HCO</a></li>
<li><a href="#">Chapter 32 New Residential board</a></li>
<li><a href="#">Tentative Interim Amendments (TIAs)</a></li>
</ul>
In list where I get
$list[‘id’],$list['section_number] and $[‘parent_section_id’]. Now I want to main a tree for it…can you people help me with the code?
Thanks in advance.