mirkoschmidt / arraydot
Functions to handle multidimensional arrays and dots.
Installs: 564
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mirkoschmidt/arraydot
Requires (Dev)
- phpunit/phpunit: ~4.6
This package is not auto-updated.
Last update: 2025-10-04 09:57:01 UTC
README
Helper functions to deal with array dotting
Installation
composer require mirkoschmidt/arraydot --no-dev
Examples
$array = [ 'config' => 'group' => [ 'setting' => 'value', 'setting2' => 'value2', ], ], ]; $array = array_dot($array); // Elements can now be accessed using dot notation, like the example below. // Echos: 'value'; echo $array['config.group.setting']; // To return the array back to the original, the following // line can be used. $array = array_undot($array); // Echos 'value2' echo $array['config']['group']['setting2'];