A library for array manipulations.
- Installation
- Notes on examples
- Array utils
- accessible
- add
- add_prefixed_keys_to
- add_unprefixed_keys_to
- array_visit_recursive
- collapse
- destringify_keys
- dot
- escape_multidimensional_array
- except
- exists
- filter_to_flat_scalar_associative_array
- filter_prefixed
- first
- flatten
- forget
- get
- get_first_set
- get_in_any
- has
- insert_after_key
- insert_before_key
- is_assoc
- is_list
- join
- last
- list_to_array
- map_or_discard
- merge_recursive
- merge_recursive_query_vars
- only
- parse_associative_array_alias
- prepend
- pull
- query
- random
- recursive_ksort
- remove_numeric_keys_recursive
- remove_string_keys_recursive
- set
- shape_filter
- shuffle
- sort_by_priority
- sort_recursive
- sort_recursive_desc
- stringify_keys
- strpos
- to_list
- undot
- usearch
- where
- where_not_null
- wrap
- Acknowledgements
It's recommended that you install Arrays as a project dependency via Composer:
composer require stellarwp/arrays
We actually recommend that this library gets included in your project using Strauss.
Luckily, adding Strauss to your
composer.json
is only slightly more complicated than adding a typical dependency, so checkout our strauss docs.
Since the recommendation is to use Strauss to prefix this library's namespaces, all examples will be using the Boomshakalaka
namespace prefix.
A number of array methods were ported over from The Events Calendar and the Laravel Framework.