Pharaonic
Loading...
Dot-Array
php-dot-array

# Why Dot-Array?

Dot-Array is a package that helps to access the arrays using dot notation and asterisk so it gonna be the easier than the traditional way.

# Installation

Install the latest version using Composer.

1composer require pharaonic/php-dot-array

# Example

This is an example that shows the difference between the traditional way of using the array and the Dot-Array way.

Traditional Way :

1$names = [];
2 
3foreach($users as $user) {
4 $names[] = $user['name'];
5}

Dot-Array Way :

1$names = dot($users)->get('*.name');