private function hasChild($rows, $id)
    {
        foreach ($rows as $row) {
            if ($row['parent_id'] == $id) {
                return true;
            }
        }

        return false;
    }
private function hasChild($rows, $id)
    {
        foreach ($rows as $row) {
            if ($row['parent_id'] == $id) {
                return true;
            }
        }

        return false;
    }
private function hasChild ( $ rows , $ id ) { foreach ( $ rows as $ row ) { if ( $ row [ 'parent_id' ] == $ id ) { return true ; } } return false ; }
Check node for child.
@param array $rows
@param int $id parent id
@return bool
Check node for child .