Added array_undot() helper
This commit is contained in:
parent
98b7b9f6a8
commit
f8d7432965
@ -12,4 +12,18 @@ 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