How to add PHP pagination in array's

后端 未结 2 1659
悲&欢浪女
悲&欢浪女 2020-12-08 11:32

I\'ve been trying a lot of ways to add PHP pagination. I have tried searching and trying to figure other ways of implementing the pagination but none of them work.

H

2条回答
  •  不思量自难忘°
    2020-12-08 12:14

    Another viable option is to use array_chunk():

    $pagedArray = array_chunk($originalArray, 10, true);
    $nthPage = $pagedArray[$pageNumber];
    

提交回复
热议问题