Compare commits

...

1 Commits
0.2.0 ... 0.2.1

Author SHA1 Message Date
Deon George
f8d7432965 Added array_undot() helper 2018-08-11 15:11:34 +10:00

View File

@@ -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;
}
}