我想使用2个不同的数据源进行分页

I want to pagination using 2 different data sources using PHP.

1, Mysql database

2, Text file

start pagination 1 page from MySQL database data and the end to text file data

Example: in start show data from MySQL DB and then when database data ends then show from text file

Example: 1 to 6 pages show data from db and after page 6 data show from text file

here is text file fetch code

Bro here is text file fetch code

function FetchUsernames(){
    $file_contents = file_get_contents('review_files/usernames.txt');
    $usernames  = explode("
",$file_contents);
    shuffle($usernames);
    return $usernames;
}

function FetchReviewTitles(){
    $file_contents = file_get_contents('review_files/review_titles.txt');
    $titles  = explode("
",$file_contents);
    shuffle($titles);
    return $titles;
}

function FetchReviews(){
    $file_contents = file_get_contents('review_files/reviews.txt');
    $reviews  = explode("|",$file_contents);
    shuffle($reviews);
    return $reviews;
}

function MergeTXTFilesData(){
  $FetchUsernames = FetchUsernames();
  $FetchReviewTitles = FetchReviewTitles();
  $FetchReviews = FetchReviews();

foreach ($FetchUsernames as $key => $username){
    if (isset($FetchReviewTitles[$key]) && isset($FetchReviews[$key])){
        $Reviews[$key]['username'] = $username;
        $Reviews[$key]['title'] = $FetchReviewTitles[$key];
        $Reviews[$key]['review'] = $FetchReviews[$key];
    }
}

return $Reviews;

and we fetched data from mysql and paginated

but now we need to merge pagination

解决pagehelper不能对2个数据源分页问题。 解决2个都能返回分页数据api合并后的分页问题。 resolve pagehelper can't deal with 2 data's page problem, the first data will be showed page by page, and then the second。
在github or gitee, search “pagemergehelper”