I have a database table with these records:

```
parent_id   child_id    
    0   1   
    0   2   
    0   3   
    0   4   
    0   5   
    0   6   
    0   7   
    0   8   
    0   9   
    0   10  
    0   11  
    0   12  
    1   13  
    1   14  
    1   15  
    2   16  
    2   17  
    2   18  
    3   19  
    3   20  
    3   21  
    4   22  
    4   23  
    4   24  
    5   25  
    5   26  
    5   27  
    6   28  
    6   29  
    6   30  
    7   31  
    7   32  
    7   33  
    7   34  
    1   35  
    1   36  
    1   37  
    1   38  
    1   39

```

I want to build a tree structure with parent/child using a recursive function. 

```
function recursion ($parentID, $lvl){

$query = 'SELECT parent_id, child_id FROM ///// WHERE parent_id='.$parentID;    
$this->_db->setQuery($query);
$this->_db->query();
$records = $this->_db->loadObjectList();

$count = count($records);

    if ($count > 0){
            foreach ($records as $item){
                print_r ("parent id  ".$item->parent_id."child id  ".$item->child_id."  lvl->  ".$lvl."</br>");
                return $this->recursion($item->child_id, $lvl+1);
        }
    }
}   

```

My code only prints: 

```
parent id 0child id 1 lvl-> 1
parent id 1child id 13 lvl-> 2

```

I can't figure out how to print the whole tree. I guess I'm on the right path. Can someone give me a hint on how to print the whole tree?