2017 © Pedro Peláez
 

library array_undot

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

image

divineomega/array_undot

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

  • Monday, April 23, 2018
  • by DivineOmega
  • Repository
  • 2 Watchers
  • 8 Stars
  • 439 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 87 % Grown

The README.md

array_undot

Build Status Coverage Status StyleCI Packagist, (*1)

This package provides a helper function called array_undot, which expands a dot notation array into a full multi-dimensional array. It is, therefore, the opposite of the array_dot helper function provided by Laravel., (*2)

Installation

To install, just run the following composer command., (*3)

composer require divineomega/array_undot

The array_undot helper function will then be available globally in your project., (*4)

Usage

The following basic examples show how to use the array_undot helper function., (*5)

$dotNotationArray = ['products.desk.price' => 100];

$expanded = array_undot($dotNotationArray)

// ['products' => ['desk' => ['price' => 100]]];
$dotNotationArray = ['products.desk.price' => 100, 
                     'products.desk.name' => 'Oak Desk',
                     'products.lamp.price' => 15,
                     'products.lamp.name' => 'Red Lamp'];

$expanded = array_undot($dotNotationArray)

/*
[
    'products' => [
        'desk' => [
            'price' => 100,
            'name' => 'Oak Desk'
        ],
        'lamp' => [
            'price' => 15,
            'name' => 'Red Lamp'
        ]
    ]
]
*/

The Versions

23/04 2018

dev-master

9999999-dev

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

  Sources   Download

LGPL-3.0-only

The Requires

 

The Development Requires

by Jordan Hall

20/04 2018

v2.0.0

2.0.0.0

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

  Sources   Download

LGPL-3.0-only

The Requires

 

The Development Requires

by Jordan Hall

24/01 2018

v1.0.1

1.0.1.0

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional array.

  Sources   Download

LGPL-3.0-only

The Requires

 

The Development Requires

by Jordan Hall

12/01 2018

v1.0.0

1.0.0.0

array_undot (the opposite of the array_dot helper function) expands a dot notation array into a full multi-dimensional a

  Sources   Download

LGPL3

The Requires

 

The Development Requires

by Jordan Hall