src/Support/Arr.php
/**
	 * Flatten a multi-dimensional associative array with dots.
	 *
	 * @param array $array
	 * @param string $prepend
	 * @return array
	 */
Flatten a multi-dimensional associative array with dots.
Flatten a multi - dimensional associative array with dots .
public static function dot($array, $prepend = '') {
		$results = array();
		foreach ($array as $key => $value) {
			if (is_array($value) && !empty($value)) {
				$results = array_merge($results, static::dot($value, $prepend . $key . '.'));
			}
			else {
				$results[$prepend . $key] = $value;
			}
		}
		return $results;
	}
public static function dot ( $ array , $ prepend = '' ) { $ results = array ( ) ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) && ! empty ( $ value ) ) { $ results = array_merge ( $ results , static :: dot ( $ value , $ prepend . $ key . '.' ) ) ; } else { $ results [ $ prepend . $ key ] = $ value ; } } return $ results ; }
Flatten a multi-dimensional associative array with dots.
Flatten a multi - dimensional associative array with dots .