i have MySql Table name 'category', in that table i have
id catname parent_id
1 animals
2 vegs
3 dog 1
4 cat 1
5 carrot 2
i just wanna display this data in html nested 'ul' like
<ul>
<li>Animals
<ul>
<li>dog</li>
<li>cat</li>
</ul>
</li>
<li>Vegs
<ul>
<li>Carrot</li>
</ul>
</li>
</ul>
with php, please help me to get this data with php(CodeIgniter) and display.