PHPackages                             jinfakeji168/pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jinfakeji168/pagination

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jinfakeji168/pagination
=======================

适用于所有程序的数组分页，内置分页样式,可定制样式,稍微修改一下可使用与所有的情形下的数组分页

v1.1.1(2y ago)0181MITPHPPHP &gt;=5.3.0

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jinfakeji168/pagination)[ Packagist](https://packagist.org/packages/jinfakeji168/pagination)[ RSS](/packages/jinfakeji168-pagination/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (1)

pagination
==========

[](#pagination)

数组分页,可定制样式,内置3种样式,稍微修改一下可使用与所有的情形下的数组分页

Installation
------------

[](#installation)

Pagination is available on [Packagist](https://packagist.org/packages/phprookiehbb/pagination).Just add this line to your `composer.json` file:

```
"phprookiehbb/pagination": "dev-master"
```

or run

```
composer require phprookiehbb/pagination:dev-master
```

### Example

[](#example)

```
use Crasphb\Pagination;
$pagination = new Pagination($target,1,['style' => 1,'simple'=>false,'allCounts'=>true,'nowAllPage'=>true,'toPage'=>true]);
//数组的分页后的元素
$item = $pagination->getItem();
//分页样式的渲染
$page = $pagination->render();
```

### Explanation

[](#explanation)

参数类型说明targetarray需要分页的数组defaultPageSizeint每页的数目styleint分页样式，可选值1,2,3simplebooleantrue:简单的分页样式,false:复杂的分页样式allCountsboolean显示总页数nowAllPageboolean显示现在的页码toPageboolean跳转页码的功能### Show

[](#show)

#### simple模式

[](#simple模式)

[![simple模式](https://camo.githubusercontent.com/98d9885277f268b39e8bc337897a3b999756aca5f49f2d5a8ad800c1e09c87e5/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462343535626235656537393431382e706e67)](https://camo.githubusercontent.com/98d9885277f268b39e8bc337897a3b999756aca5f49f2d5a8ad800c1e09c87e5/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462343535626235656537393431382e706e67)

#### style = 1,2,3

[](#style--123)

[![Image1 text](https://camo.githubusercontent.com/d29fbe5584be9060d1e1ff7762487cb31decce28ffc64320917098035a2fd4e5/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462346437333462643938313630342e706e67)](https://camo.githubusercontent.com/d29fbe5584be9060d1e1ff7762487cb31decce28ffc64320917098035a2fd4e5/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462346437333462643938313630342e706e67)

[![Image1 text](https://camo.githubusercontent.com/8c3f827a5aa87de4d3e2320eec815bbd745ce85252b118725b713f02c2644499/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462346630626366643031313836322e706e67)](https://camo.githubusercontent.com/8c3f827a5aa87de4d3e2320eec815bbd745ce85252b118725b713f02c2644499/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462346630626366643031313836322e706e67)

[![Image1 text](https://camo.githubusercontent.com/848722da87184858d5ed481c109a7f3509f227ea7034f1a848dea2498553d0ee/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462353032336162373635343731302e706e67)](https://camo.githubusercontent.com/848722da87184858d5ed481c109a7f3509f227ea7034f1a848dea2498553d0ee/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462353032336162373635343731302e706e67)

#### allCount,nowAllPage,toPage模式

[](#allcountnowallpagetopage模式)

[![Image1 text](https://camo.githubusercontent.com/16bd96cf959e0da40fd60e79d47418f500e385159a36e3d9f687f6547bf68dcd/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462353131393263323332353033302e706e67)](https://camo.githubusercontent.com/16bd96cf959e0da40fd60e79d47418f500e385159a36e3d9f687f6547bf68dcd/68747470733a2f2f692e6c6f6c692e6e65742f323031392f30352f32322f3563653462353131393263323332353033302e706e67)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

736d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155955836?v=4)[jinfakeji168](/maintainers/jinfakeji168)[@jinfakeji168](https://github.com/jinfakeji168)

---

Top Contributors

[![jinfakeji168](https://avatars.githubusercontent.com/u/155955836?v=4)](https://github.com/jinfakeji168 "jinfakeji168 (2 commits)")

---

Tags

arraypaginationtp5

### Embed Badge

![Health badge](/badges/jinfakeji168-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/jinfakeji168-pagination/health.svg)](https://phpackages.com/packages/jinfakeji168-pagination)
```

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k430.2M1.4k](/packages/doctrine-collections)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k317.3M3.2k](/packages/symfony-property-access)[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k430.4M1.7k](/packages/nette-utils)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565335.0M36](/packages/league-config)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k13.2M174](/packages/cuyz-valinor)[openlss/lib-array2xml

Array2XML conversion library credit to lalit.org

31053.8M53](/packages/openlss-lib-array2xml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
