PHPackages                             sajadsdi/array-dot-notation - 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. sajadsdi/array-dot-notation

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

sajadsdi/array-dot-notation
===========================

set and get with dot notation in arrays

1.0.5(2y ago)46.0k↓73%MITPHPPHP ^8.0

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sajadsdi/array-dot-notation)[ Packagist](https://packagist.org/packages/sajadsdi/array-dot-notation)[ RSS](/packages/sajadsdi-array-dot-notation/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

[![PHP Array Dot Notation](https://camo.githubusercontent.com/d9685eeb55d3ad485cc4941c55e43c187705ace7c6803addb6c29b68aa022bb0/68747470733a2f2f73616a61647364692e6769746875622e696f2f696d616765732f61727261792d646f742d6e6f746174696f6e2e706e67)](https://camo.githubusercontent.com/d9685eeb55d3ad485cc4941c55e43c187705ace7c6803addb6c29b68aa022bb0/68747470733a2f2f73616a61647364692e6769746875622e696f2f696d616765732f61727261792d646f742d6e6f746174696f6e2e706e67)

Array Dot Notation
==================

[](#array-dot-notation)

Array Dot Notation is a high-performance and lightweight PHP library that allows you to set and get values in arrays using dot notation. It simplifies working with nested arrays by providing an intuitive way to access and modify data.

Features
--------

[](#features)

- Get values from arrays using dot notation keys.
- Set values in arrays using dot notation keys.
- Delete key(s) from array using dot notation.
- Check if a key or multi keys exists in an array using dot notation.
- Check if one key from keys is exists in an array...
- Map keys for output data in get operations.
- single and multiple default value for `get` function
- callback for when to return the default value for each key in `get` function
- callback for when set ech keys in `set` function

Installation
------------

[](#installation)

You can install this library using Composer. If you haven't already set up Composer for your project, you can do so by following the [official Composer installation guide](https://getcomposer.org/doc/00-intro.md).

Once Composer is installed, run the following command to install Array Dot Notation:

```
composer require sajadsdi/array-dot-notation
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Here's how you can use Array Dot Notation in your PHP project:

```
