Fills a column with a value in a given multi-dimensional array.

Basically writing into:   $array[<n>][$subKey] = <$value>


Syntax

array_fill_column(array $array, string $subKey, $value, bool $force = true): array


Parameter

@param array $array The target array of sub-arrays in which the column ($sbuKey) will be injected.

If this is not yet an array, an empty new array is created at first.

@param array $value The 1-dimensional array containing the values to be injected.

Based on these keys (numeric / associative) the corresponding keys/elements are addressed within the target $array.

@param string|int|null $subKey The key (column) under which the each $values are injected.

@param bool If TRUE then the $value will be written into $array[<n>][$subKey] in any case.

If FALSE only $array[<n>][$subKey] does not exist or its value is NULL.


Return

Returns the enriched $array.


Examples

Yet to come...

...