src/Support/Arr.php
/**
	 * Runs a callable for each item in an array. You can return values from the callable to create a new array with
	 * those values for each key.
	 *
	 * @param $array
	 * @param $callable
	 * @return array
	 */
Runs a callable for each item in an array. You can return values from the callable to create a new array with
those values for each key.

@param $array
@param $callable
@return array
Runs a callable for each item in an array . You can return values from the callable to create a new array with those values for each key . @param $array @param $callable @return array
public static function each($array, $callable) {
		$revised = array();
		foreach ($array as $key => $value) {
			$revised[$key] = $callable($value, $key);
		}
		return $revised;
	}
public static function each ( $ array , $ callable ) { $ revised = array ( ) ; foreach ( $ array as $ key => $ value ) { $ revised [ $ key ] = $ callable ( $ value , $ key ) ; } return $ revised ; }
Runs a callable for each item in an array.
Runs a callable for each item in an array .