PHPackages                             liaosp/array-search - 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. liaosp/array-search

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

liaosp/array-search
===================

Array search, array paging 数组搜索，数组分页

1.0.4(6y ago)117MITPHP

Since Jan 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/liaoshengping/arraySearch)[ Packagist](https://packagist.org/packages/liaosp/array-search)[ RSS](/packages/liaosp-array-search/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

A simple Array search and array paging
=======================================

[](#a-simple--array-search-and-array-paging-)

 .

Installing
----------

[](#installing)

```
$ composer require liaosp/array-search -vvv
```

Usage
-----

[](#usage)

example：

```
$target = [
    [
        'id'=>1,
        'status'=>3
        ],
    [
        'id'=>2,
        'status'=>1
    ],
    [
        'id'=>3,
        'status'=>2
    ],
    [
        'id'=>4,
        'status'=>1
    ],
    [
        'id'=>5,
        'status'=>1
    ],
    [
        'id'=>6,
        'status'=>1
    ],

];
```

```
$obj = new ArraySearch();

$data = $obj->arrayData($target)->paginate(1);//firstPageData  ，第一页数据。

```

where：

```
$data = $obj->arrayData($target)->where(['status'=>1])->paginate(1);//firstPageData  ，第一页数据。

```

whereIn:

```
$data = $obj->arrayData($target)->whereIn(['status'=>[1,2]])->paginate(1);//firstPageData  ，第一页数据。

```

orWhere:

```
$data = $obj->arrayData($target)->orWhere(['status'=>1,'id'=>1])->paginate(1);//firstPageData  ，第一页数据。

```

notWhere:

```
$data = $obj->arrayData($target)->notWhere(['status'=>1,'id'=>1])->paginate(1);//firstPageData  ，第一页数据。

```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/liaoshengping/arraySearch/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/liaoshengping/arraySearch/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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 ~4 days

Total

5

Last Release

2297d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/440eb424aa6385a9bca5bf1597270a4235e943a67536900f7fbf0c8cdb96594e?d=identicon)[liaoshengping](/maintainers/liaoshengping)

### Embed Badge

![Health badge](/badges/liaosp-array-search/health.svg)

```
[![Health](https://phpackages.com/badges/liaosp-array-search/health.svg)](https://phpackages.com/packages/liaosp-array-search)
```

###  Alternatives

[glicer/link-checker

Check broken links in html files, sitemap.xml and robots.txt

3113.7k](/packages/glicer-link-checker)[mpociot/chuck-norris-jokes

Create random Chuck Norris jokes.

251.2k](/packages/mpociot-chuck-norris-jokes)[cyrkulewski/seo-url

Module converts any string to valid URL

121.2k](/packages/cyrkulewski-seo-url)

PHPackages © 2026

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