original_string: public static function unflatten(array $array, $delimiter = '.')
      {
          $unflattenedArray = array();
  
          foreach ($array as $key => $value) {
              $keyList  = explode($delimiter, $key);
              $firstKey = array_shift($keyList);
  
              if (sizeof($keyList) > 0) {
                  $subArray = static::unflatten(array( implode($delimiter, $keyList) => $value ), $delimiter);
  
                  foreach ($subArray as $subArrayKey => $subArrayValue) {
                      $unflattenedArray[ $firstKey ][ $subArrayKey ] = $subArrayValue;
                  }
              } else {
                  $unflattenedArray[ $firstKey ] = $value;
              }
          }
  
          return $unflattenedArray;
      }
code: public static function unflatten(array $array, $delimiter = '.')
      {
          $unflattenedArray = array();
  
          foreach ($array as $key => $value) {
              $keyList  = explode($delimiter, $key);
              $firstKey = array_shift($keyList);
  
              if (sizeof($keyList) > 0) {
                  $subArray = static::unflatten(array( implode($delimiter, $keyList) => $value ), $delimiter);
  
                  foreach ($subArray as $subArrayKey => $subArrayValue) {
                      $unflattenedArray[ $firstKey ][ $subArrayKey ] = $subArrayValue;
                  }
              } else {
                  $unflattenedArray[ $firstKey ] = $value;
              }
          }
  
          return $unflattenedArray;
      }
code_tokens: public static function unflatten ( array $ array , $ delimiter = '.' ) { $ unflattenedArray = array ( ) ; foreach ( $ array as $ key => $ value ) { $ keyList = explode ( $ delimiter , $ key ) ; $ firstKey = array_shift ( $ keyList ) ; if ( sizeof ( $ keyList ) > 0 ) { $ subArray = static :: unflatten ( array ( implode ( $ delimiter , $ keyList ) => $ value ) , $ delimiter ) ; foreach ( $ subArray as $ subArrayKey => $ subArrayValue ) { $ unflattenedArray [ $ firstKey ] [ $ subArrayKey ] = $ subArrayValue ; } } else { $ unflattenedArray [ $ firstKey ] = $ value ; } } return $ unflattenedArray ; }
docstring: Unflattens a single stacked array back into a multidimensional array.
  
  @param  array  $array
  @param  string $delimiter
  @return array
docstring_tokens: Unflattens a single stacked array back into a multidimensional array .