joomla-framework/utilities — pull request #5 by asika32764 (2014-09-15 02:17:19+00:00)
Title: Add flatten() to ArrayHelper

This is a method to make nested data to one-dimension array. Similar to Laravel `array_dot()`.

## Example

``` php
use Joomla\Utilities\ArrayHelper;

$array = array(
'flower' => array(
'sakura' => 'samurai',
'olive' => 'peace'
)
);

// Make nested data flatten and separate by dot (".")

$flatted1 = ArrayHelper::flatten($array);

echo $flatted1['flower.sakura']; // 'samuari'

// Custom separator

$flatted2 = ArrayHelper::flatten($array, '/');

echo $flatted2['flower/olive']; // 'peace'
```