Skip to content
/ Arrayor Public

A simple class that provide some functions to manipulate arrays.

Notifications You must be signed in to change notification settings

Xety/Arrayor

Repository files navigation

Arrayor

A simple class that provide some functions to manipulate arrays.

Travis Coverage Scrutinizer Stable Version Downloads License
Build Status Coverage Status Scrutinizer Latest Stable Version Total Downloads License

Requirements

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';

Contribute

Follow this guide to contribute

About

A simple class that provide some functions to manipulate arrays.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages