Added array_undot() helper
This commit is contained in:
parent
98b7b9f6a8
commit
f8d7432965
@ -13,3 +13,17 @@ if (! function_exists('is_json')) {
|
||||
return (json_last_error() == JSON_ERROR_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
// Inverse of array_dot()
|
||||
if (! function_exists('array_undot')) {
|
||||
function array_undot($dotNotationArray)
|
||||
{
|
||||
$array = [];
|
||||
|
||||
foreach ($dotNotationArray as $key => $value) {
|
||||
array_set($array, $key, $value);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user