PHPackages                             kharanenka/php-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. kharanenka/php-pagination

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

kharanenka/php-pagination
=========================

Get pagination elements

2.0.3(7y ago)441.8k—8.2%21GPL-3.0PHPPHP &gt;=5.6

Since Oct 24Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (8)Used By (1)

Class PaginationHelper
======================

[](#class-paginationhelper)

You can get pagination elements with "PaginationHelper" class

Installation
============

[](#installation)

Require this package in your `composer.json` and update composer.

```
"kharanenka/php-pagination": "2.0.*"
```

Usage
=====

[](#usage)

```
 $arPagination = PaginationHelper::get($iCurrentPage, $iTotalCount, $arSettings);
```

Result
======

[](#result)

```
[
    [
        'name' => 'First',
        'value' => 1,
        'class' => 'pagination-first-button',
        'code' => 'first',
    ],
    ...
    [
        'name' => '3',
        'value' => 3,
        'class' => 'pagination-i _act',
        'code' => null,
    ],
    ...
    [
        'name' => 'Last',
        'value' => 10,
        'class' => 'pagination-last-button',
        'code' => 'last',
    ]
]
```

Default settings
================

[](#default-settings)

```
$arSettings = [

        //Common settings
        'button_list' => ['main'],                  // Button list
                                                    // You can set order button in 'button_list' array
                                                    // Button key list:
                                                    // - main
                                                    // - first
                                                    // - first-more
                                                    // - prev
                                                    // - prev-more
                                                    // - next
                                                    // - next-more
                                                    // - last
                                                    // - last-more
                                                    // For example:
                                                    // ['prev', 'main', 'next']
                                                    // ['first', 'prev', 'main', 'next', 'last']
                                                    // ['prev', 'first', 'main', 'last', 'next']

        'count_per_page' => 10,                     // Count elements per page
        'pagination_limit' => 5,                    // Count main pagination buttons
        'active_class' => '_act',                   // Button class for active page

        //Button "First"
        'first_button_name' => 'First',             // Button name
        'first_button_limit' => 1,                  // Show button if current page > this value
        'first_button_number' => false,             // true - button name = page number
        'first_button_class' => null,               // Button class

        //Button "First-More"
        'first-more_button_name' => '...',          // Button name
        'first-more_button_limit' => 1,             // Show button if current page > this value
        'first-more_button_class' => null,          // Button class

        //Button "Prev"
        'prev_button_name' => 'Prev',               // Button name
        'prev_button_limit' => 1,                   // Show button if current page > this value
        'prev_button_number' => false,              // true - button name = page number
        'prev_button_class' => null,                // Button class

        //Button "Prev-More"
        'prev-more_button_name' => '...',           // Button name
        'prev-more_button_limit' => 1,              // Show button if current page > this value
        'prev-more_button_class' => null,           // Button class

        //Main buttons
        'main_button_on' => true,                   // Switch on/off button
        'main_button_class' => null,                // Button class

        //Button "Next-More"
        'next-more_button_name' => '...',           // Button name
        'next-more_button_limit' => 1,              // Show button if current page + this value  null,           // Button class

        //Button "Next"
        'next_button_name' => 'Next',               // Button name
        'next_button_limit' => 1,                   // Show button if current page + this value  false,              // true - button name = page number
        'next_button_class' => null,                // Button class

        //Button "Last-More"
        'last-more_button_name' => '...',           // Button name
        'last-more_button_limit' => 1,              // Show button if current page + this value  null,           // Button class

        //Button "Last"
        'last_button_name' => 'Last',               // Button name
        'last_button_limit' => 1,                   // Show button if current page + this value  false,              // true - button name = page number
        'last_button_class' => null,                // Button class
    ];
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Every ~107 days

Recently: every ~156 days

Total

7

Last Release

2896d ago

Major Versions

1.0.2 → 2.0.02016-11-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/f72dfe2a14224cf1e368ddefcd7886bbe7be751a21fe77227175ba21ebfab823?d=identicon)[Andrey Kharanenka](/maintainers/Andrey%20Kharanenka)

---

Top Contributors

[![kharanenka](https://avatars.githubusercontent.com/u/18258760?v=4)](https://github.com/kharanenka "kharanenka (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

phppagination

### Embed Badge

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

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

###  Alternatives

[stefangabos/zebra_pagination

A generic, Twitter Bootstrap compatible, PHP pagination library that automatically generates navigation links

11923.8k](/packages/stefangabos-zebra-pagination)[yidas/pagination

PHP Paginator with Pager Widget (pure PHP, CI, Yii, Laravel support)

2718.2k](/packages/yidas-pagination)

PHPackages © 2026

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