Returns an array with normalized (range-mapped) values for a (sub)array.

The returned normalized values are always between:   0.0 and 1.0


Syntax

array_normalize(array $array, string $subKey, $valueMin = 0, $valueMax = null, $normMin = 0.0, $normMax = 1.0): array


Parameter

@param array $array A multi-dimensional numeric or associative array.

@param string|int|null $subKey The key (column) identifying the column within $array to extract.

@param float|int|null $valueMin The used minimum-value (lower end of normalized range). If NULL then the minimum-value of the given array is used and mapped to 0.0.

@param float|int|null $valueMax The used maximum-value (upper end of normalized range). If NULL then the maximum-value of the given array is used and mapped to 1.0.

@param float|int $normMin The lower end of the normalized ("mapped to") range. Usually this is: 0.0 .

@param float|int $normMax The upper end of the normalized ("mapped to") range. Usually this is: 1.0 .


Return

Returns an array with the normalized values. The returned array keys are the same as in $array.


Examples

Yet to come...

...