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

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

chr15k/array
============

Awesome Array helpers package

1.0.1(5y ago)328MITPHPPHP ^7.4CI failing

Since Jul 5Pushed 5y ago2 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Awesome Array helpers for your PHP project
==========================================

[](#awesome-array-helpers-for-your-php-project)

[![Latest Stable Version](https://camo.githubusercontent.com/17084cc891d1ff2936c6b8639722086c2cc90e78c73006e20e53a09f4d8ac88f/68747470733a2f2f706f7365722e707567782e6f72672f63687231356b2f61727261792f76)](//packagist.org/packages/chr15k/array) [![Latest Unstable Version](https://camo.githubusercontent.com/d143e992288d845bd4557cb9b00b4b44ca9659ff81bb0414ba66891ab7daff19/68747470733a2f2f706f7365722e707567782e6f72672f63687231356b2f61727261792f762f756e737461626c65)](//packagist.org/packages/chr15k/array) [![Total Downloads](https://camo.githubusercontent.com/8a3edb0f147826a85f2a0d8ab65fbd2ee2056233b96b9d5b6e55cde94f160bb6/68747470733a2f2f706f7365722e707567782e6f72672f63687231356b2f61727261792f646f776e6c6f616473)](//packagist.org/packages/chr15k/array) [![License](https://camo.githubusercontent.com/c485b564dc9b3a7db77cf1e5e64f7a297f99411de7382318e16c5a980dbadee7/68747470733a2f2f706f7365722e707567782e6f72672f63687231356b2f61727261792f6c6963656e7365)](//packagist.org/packages/chr15k/array)

This package provides useful helpers for working with arrays in PHP.

Based on ...

- Laravel's array helper work ()

Install
-------

[](#install)

You can install this package via composer:

```
composer require chr15k/array
```

Usage
-----

[](#usage)

- [accessible](#accessible)
- [add](#add)
- [collapse](#collapse)
- [crossJoin](#crossJoin)
- [divide](#divide)
- [dot](#dot)
- [except](#except)
- [exists](#exists)
- [first](#first)
- [flatten](#flatten)
- [forget](#forget)
- [get](#get)
- [has](#has)
- [hasAny](#hasAny)
- [isAssoc](#isAssoc)
- [isMultiDimensional](#isMultiDimensional)
- [last](#last)
- [only](#only)
- [pluck](#pluck)
- [prepend](#prepend)
- [pull](#pull)
- [query](#query)
- [random](#random)
- [set](#set)
- [shuffle](#shuffle)
- [sort](#sort)
- [sortRecursive](#sortRecursive)
- [where](#where)
- [wrap](#wrap)

### Arr::accessible()

[](#arraccessible)

The Arr::accessible method checks that the given value is array accessible:

```
