below to share a PHP implementation of unlimited column category reading examples, I hope that the article will bring help to you
The idea of realizing infinite pole column classification: Get the ID (that is, the parent ID) and then get the child ID (that is, the UID child ID) to the database as follows Id:1 uid:0 I am column 1 id:2 uid:1 I am column 2 id:3 uid:1 I am a subclass of column 1 display results: &NBS P I'm column 1 &NBSP ; &NB Sp I am a subclass of column 1 I am column 2 The following is the PHP code Code As follows: <?php $query = $this->db->query ("Select * from category"); $list = $query->result (); foreach ($list as $v) { if ($v->category_id = 0) {//Get parent column (equal to 0 is parent) $categoryul = anchor ("home/ content/". $v->id, $v->category_name); echo "<ul>". $categoryul. " </ul> "; $LISTX = $this->listx->list_id ($v->id);/Displays the specified sub-column foreach ($listx as $vid) { $category = anchor ("home/content/") based on the parent ID. $vid->id, $vid-> Category_name); echo "<li>". $category. " </li> "; &NBSP} } }?>