xety / arrayor
A simple class that provide some functions to manipulate arrays.
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/xety/arrayor
Requires
- php: >=5.4.0
Requires (Dev)
- cakephp/cakephp-codesniffer: dev-master
- phpunit/phpunit: 3.*
This package is auto-updated.
Last update: 2025-10-05 02:24:38 UTC
README
A simple class that provide some functions to manipulate arrays.
Travis | Coverage | Scrutinizer | Stable Version | Downloads | License |
---|---|---|---|---|---|
Requirements
- 📦 Composer
Functions
Arrayor::camelizeIndex($array, $delimiter = '_')
- Camelize all index keys in the first level.
$array = [ 'Index key' => 1, 'key_index' => 2 ]; $result = Arrayor::camelizeIndex($array); $result = [ 'indexKey' => 1, 'keyIndex' => 2 ];
Arrayor::implodeRecursive($array = [], $glue = ' : ', $separator = ' | ')
- Implode an array into a string by both key and value.
$array = [ 'key-index' => 1, 'key index' => 'value' ]; $string = Arrayor::implodeRecursive($array); $string = 'key-index : 1 | key index : value';