PHPackages                             jsnlib/group - 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. jsnlib/group

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

jsnlib/group
============

1.1.0(8y ago)014MITPHPPHP &gt;=7.0.0

Since Mar 9Pushed 8y agoCompare

[ Source](https://github.com/fdjkgh580/jsnlib-group)[ Packagist](https://packagist.org/packages/jsnlib/group)[ RSS](/packages/jsnlib-group/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (5)Used By (0)

jsnlib-group
============

[](#jsnlib-group)

假設我們有這樣的陣列

```
$ary = array('a', 'b', 'c', 'd', 'e', 'f', 'g');
```

一、指定每個盒子最多有多少個
--------------

[](#一指定每個盒子最多有多少個)

```
$result = Jsnlib\Group::length($ary, 3);
print_r($result);

/*Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
            [2] => c
        )

    [1] => Array
        (
            [0] => d
            [1] => e
            [2] => f
        )

    [2] => Array
        (
            [0] => g
        )

)*/
```

二、指定總共有多少個盒子
------------

[](#二指定總共有多少個盒子)

```
$result = Jsnlib\Group::each($ary, 3);
print_r($result);

/*
Array
(
    [0] => Array
        (
            [0] => a
            [1] => d
            [2] => g
        )

    [1] => Array
        (
            [0] => b
            [1] => e
        )

    [2] => Array
        (
            [0] => c
            [1] => f
        )

)
 */
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~6 days

Total

4

Last Release

2971d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.2.4

1.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4161e8ee5212efdcdaa6a42183109f397f25c852655ec4b73cce9920cf94f2a?d=identicon)[fdjkgh580](/maintainers/fdjkgh580)

---

Top Contributors

[![fdjkgh580-2](https://avatars.githubusercontent.com/u/60056647?v=4)](https://github.com/fdjkgh580-2 "fdjkgh580-2 (5 commits)")

---

Tags

group

### Embed Badge

![Health badge](/badges/jsnlib-group/health.svg)

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

###  Alternatives

[jakezatecky/array_group_by

A function that groups/splits an array by the values of a given key or keys.

100188.7k2](/packages/jakezatecky-array-group-by)[fresns/fresns

Cross-platform general-purpose multiple content forms social network service software.

4841.5k](/packages/fresns-fresns)[symbiote/silverstripe-grouped-cms-menu

Allows you to group CMS menu items.

3696.2k6](/packages/symbiote-silverstripe-grouped-cms-menu)[mvo/contao-group-widget

Adds a new group widget that allows repeating a set of DCA fields.

28124.3k31](/packages/mvo-contao-group-widget)[drafolin/filament-collapse

This plugins aims to collapse the space between multiple fields, in the same way as ToggleButtons-&gt;grouped()

122.7k](/packages/drafolin-filament-collapse)

PHPackages © 2026

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