Skip to content

Instantly share code, notes, and snippets.

@jorgecrodrigues
Last active August 1, 2020 18:16
Show Gist options
  • Save jorgecrodrigues/249a76f5c86f281c2ede554b112569c9 to your computer and use it in GitHub Desktop.
Save jorgecrodrigues/249a76f5c86f281c2ede554b112569c9 to your computer and use it in GitHub Desktop.
<?php
if (!function_exists('array_undot')) {
/**
* Convert single level array that uses "dot" notation to a multi-dimensional array.
*
* @param $array
* @return array
*/
function array_undot($array)
{
$arr = array();
foreach ($array as $key => $value) {
data_set($arr, $key, $value);
}
return $arr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment