Last active
January 13, 2018 03:18
-
-
Save mityukov/f7f6847d142323b1c947c69d1317a4ad to your computer and use it in GitHub Desktop.
array_undot() helper functon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function array_undot($dottedArray, $initialArray = []) | |
{ | |
// to make it recursive: | |
$dottedArray = array_dot($dottedArray); | |
foreach ($dottedArray as $key => $value) { | |
array_set($initialArray, $key, $value); | |
} | |
return $initialArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment