好的,我是新来的,我整天都在努力解决这个问题,我有两个函数一个调用另一个,但我的函数只返回最后一个值,例如29当它应该返回多个值时。想知道如何解决这个问题,以便我的函数返回所有值。
这是我的PHP代码。
function parent_comments(){
    if(articles_parent_comments_info($_GET['article_id']) !== false){
        foreach(articles_parent_comments_info($_GET['article_id']) as $comment_info){
            $comment_id = filternum($comment_info['comment_id']);
            reply_comment_count($comment_id);
        }
    }
}
function reply_comment_count($parent_id){
    if(articles_reply_comments_info($_GET['article_id']) !== false){
        foreach(articles_reply_comments_info($_GET['article_id']) as $reply_info){
            $comment_id = filternum($reply_info['comment_id']);
            $reply_id = filternum($reply_info['parent_id']);
            if($parent_id === $reply_id){
                reply_comment_count($comment_id);
            }   
        }
    }
    return $comment_id;
}