2017 © Pedro Peláez
 

library helpers-array

Useful collection of php array helpers.

image

weew/helpers-array

Useful collection of php array helpers.

  • Thursday, July 21, 2016
  • by weew
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25,338 Installations
  • PHP
  • 21 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 14 Versions
  • 18 % Grown

The README.md

Array helpers

Build Status Test Coverage Version Licence, (*1)

Table of contents

Installation

composer require weew/helpers-array, (*2)

Introduction

This tiny library provides various helper functions to deal with arrays., (*3)

Functions

array_get

Get an item from an array using "dot" notation., (*4)

mixed array_get(array $array, mixed $key [, mixed $default = null]), (*5)

array_has

Check if an item exists in an array using "dot" notation., (*6)

bool array_has(array $array, mixed $key), (*7)

array_set

Set an array item to a given value using "dot" notation., (*8)

array array_set(array &$array, mixed $key, mixed $value), (*9)

array_remove

Remove one or many array items from a given array using "dot" notation., (*10)

void array_remove(array &$array, mixed $keys), (*11)

array_add

Add an element to the array at a specific location using the "dot" notation., (*12)

array array_add(array &$array, mixed $key, mixed $value), (*13)

array_take

Get an element and remove it from the array using the "dot" notation., (*14)

array array_take(array &$array, mixed $key, [, mixed $default = null]), (*15)

array_first

Get the first element from an array., (*16)

array array_first(array &$array, [, mixed $default = null]), (*17)

array_last

Get the last element from an array., (*18)

array array_last(array &$array, [, mixed $default = null]), (*19)

array_reset

Reset all numerical indexes of an array (start from zero). Non-numerical indexes will stay untouched., (*20)

array array_reset(array $array [, bool $deep = false]), (*21)

array_dot

Flatten a multi-dimensional associative array with dots., (*22)

array array_dot(array $array [, string $prepend = '']), (*23)

array_extend

Extend one array with another., (*24)

array array_extend(array $arrays [, array $...]), (*25)

array_extend_distinct

Extend one array with another. Non associative arrays will not be merged but rather replaced., (*26)

array array_extend_distinct(array $arrays [, array $...]), (*27)

array_is_associative

Check if the given array is associative., (*28)

bool array_is_associative(array $array), (*29)

array_is_indexed

Check if an array has a numeric index., (*30)

bool array_is_indexed(array $array), (*31)

array_contains

Check if array contains a specific element., (*32)

array array_contains(array $array, mixed $search [, bool $strict = true]), (*33)

The Versions

21/07 2016

dev-master

9999999-dev

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

21/07 2016

v1.3.1

1.3.1.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

22/04 2016

v1.3.0

1.3.0.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

07/03 2016

v1.2.0

1.2.0.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

06/03 2016

v1.1.0

1.1.0.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

13/11 2015

v1.0.0

1.0.0.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

13/11 2015

v0.0.8

0.0.8.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

30/10 2015

v0.0.7

0.0.7.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

29/10 2015

v0.0.6

0.0.6.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

24/09 2015

v0.0.5

0.0.5.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

22/09 2015

v0.0.4

0.0.4.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

19/08 2015

v0.0.3

0.0.3.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

22/07 2015

v0.0.2

0.0.2.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott

21/07 2015

v0.0.1

0.0.1.0

Useful collection of php array helpers.

  Sources   Download

MIT

The Development Requires

by Maxim Kott